#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
struct three{
int x;
double y;
string z;
bool operator<(three & c)
{
return x<c.x;
}
}obj[100010];
int main()
{
int n;
cin>>n;
for(int i=0;i<n;i++)
cin>>obj[i].x>>obj[i].y>>obj[i].z;
sort(obj,obj+n);
cout.setf(ios_base::fixed);
cout.precision(2);
for(int i=0;i<n;i++) cout<<obj[i].x<<' '<<obj[i].y<<' '<<obj[i].z<<endl;
return 0;
}