#include<iostream>
using namespace std;
int n;
class student
{
int i;
private:
int score[1000];
char ID[1000][20];
public :
void intset()
{
for(i=0;i<n;i++)
cin>>ID[i]>>score[i];
}
void outset()
{
for(i=0;i<n;i++)
cout<<ID[i]<<" "<<score[i]<<endl;
}
};
int main()
{
student stud;
cin>>n;
stud.intset();
stud.outset();
}