#include<stdio.h>
struct student
{
int no;
char name[12];
int score;
};
int main(int argc,char *argv[])
{
FILE *fp = NULL;
int i=0,n=0;
struct student stus[100];
while(scanf("%d",&n)!=EOF)
{
for(i=0;i<n;i++)
{
scanf("%d %s %d",&stus[i].no,&stus[i].name,&stus[i].score);
}
fp = fopen("student.dat","w");
for(i=0;i<n;i++)
{
fprintf(fp,"%d %s %d
",stus[i].no,stus[i].name,stus[i].score);
printf("%d %s %d
",stus[i].no,stus[i].name,stus[i].score);
}
fclose(fp);
fp = NULL;
}
return 0;
}