#include<iostream>
#include<iomanip>
#include<cmath>
#include<algorithm>
#include<stdbool.h>
#include<stdio.h>
#include<cstring>
using namespace std;
struct student {
string name;
int age;
int score;
}
qwe[1000];
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> qwe[i].name >> qwe[i].age >> qwe[i].score ;
if(qwe[i].age<100)
qwe[i].age++;
qwe[i].score = qwe[i].score*6 / 5;
if (qwe[i].score * 6 / 5 > 600)
qwe[i].score = 600;
}
for (int i = 0; i < n; i++) {
cout << qwe[i].name << " " << qwe[i].age << " " << qwe[i].score << endl;
}
return 0;
}