#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <ctype.h>
struct student
{
char id[20];
char name[20];
float score1;
float score2;
float score3;
struct student *next;
};
void read_in_link( struct student * link,int n)
{
struct student *p;
int i = 0;
for (p = link; p < link + n; )
{
scanf("%s %s %f %f %f", p->id, p->name, &p->score1, &p->score2, &p->score3);
i == n - 1 ? (p->next = NULL) : (p->next = &link[i + 1]);
i++;
p++;
}
}
void print(struct student *p)
{
struct student *i;
for(i = p;i != NULL;i = i->next)
{
printf("%s,%s,%.0f,%.0f,%.0f\n",i->id,i->name,i->score1,i->score2,i->score3);
}
}
int main()
{
int n;
while (scanf("%d", &n) != EOF)
{
struct student *link;
if ((link = (struct student *)malloc(n * sizeof(struct student))) == NULL)
{
puts("Error");
exit(1);
}
read_in_link(link,n);
print(link);
}
return 0;
}