#include<iostream>
using namespace std;
int main() {
int n;
cin >> n;
cin.ignore();
for (int i = 0; i < n; i++) {
char tempt[1000] = {};
cin.getline(tempt, 1000);
int j;
char s[600] = {};
for ( j = 0; j < 1000; j++) {
if (tempt[j] == ' ') {
tempt[j] = '\0';
break;
}
else {
s[j] = tempt[j];
}
}
j++;
int age=0;
int k;
for ( k = 0; k < 3; k++) {
if(tempt[j+k]!=' ')
age = age * 10 + (tempt[j + k] - '0');
else {
break;
}
}
k++;
double score = 0;
for (int l = 0; l < 3; l++) {
if (tempt[j + k + l] != '\0')
score = score * 10 + (tempt[j + k + l] - '0');
else {
break;
}
}
age++;
score = score * 1.2;
if (score > 600) {
score = 600;
}
cout << s << " " << age << " " << score << endl;
}
}