#include <stdio.h>
#include <stdlib.h>
#include<string.h>
typedef struct student
{
char id[25];
char name[25];
int chengji1;
int chengji2;
int chengji3;
}stu;
typedef struct tagNode
{
stu date;
struct tagNode *next;
}Node;
Node *head=NULL;
void input()//录
{
Node* NewNode=(Node*)malloc(sizeof(Node));//建立一个结点(人),分配其内存
NewNode->next=NULL;//指针下一个指向空
Node* p=head;
scanf("%s %s %d %d %d",NewNode->date.id,NewNode->date.name,&NewNode->date.chengji1,&NewNode->date.chengji2,&NewNode->date.chengji3);
while(head!=NULL&&p->next!=NULL)
{
p=p->next;
}
if(head==NULL)
{
head->next=NewNode;
}
else
{
p->next=NewNode;
}
}
void search()
{
char num[25];
scanf("%s",num);
Node* p=head;
while(p!=NULL)
{
if(strcmp(p->date.id,num)==0)
{
printf("%s %s %d %d %d",p->date.id,p->date.name,p->date.chengji1,p->date.chengji2,p->date.chengji3);
p=NULL;
}
else if(p->next!=NULL)
{
p=p->next;
}
else
{
printf("Not Found");
}
}
}
int main()
{
int n,i;
scanf("%d",&n);
for(i=0;i<n;i++)
{
input();
}
search();
}