class Student
{
public static int count = 0;
private int id;
private string name;
private int kor;
private int eng;
private int math;
public int Id
{
get { return id; }
set { id = value; }
}
public string Name
{
get { return name; }
set { name = value; }
}
public int Kor
{
get { return kor; }
set { kor = value; }
}
public int Eng
{
get { return eng; }
set { eng = value; }
}
public int Math
{
get { return math; }
set { math = value; }
}
public Student(string name, int kor, int eng, int math)
{
count++;
id = count;
this.name = name;
this.kor = kor;
this.eng = eng;
this.math = math;
}
public int Sum()
{
return eng + math + kor;
}
public float Ave()
{
return (float)Sum() / 3;
}
}
class Program
{
static void Main(string[] args)
{
List<Student> students = new List<Student>();
int n = int.Parse(Console.ReadLine());
for(int i = 0; i < n; i++)
{
string[] tmp = Console.ReadLine().Split(' ');
Student tmpStudent = new Student(tmp[0], int.Parse(tmp[1]), int.Parse(tmp[2]), int.Parse(tmp[3]));
students.Add(tmpStudent);
}
for (int i = 0; i < students.Count; i++)
{
Console.WriteLine(students[i].Name);
}
}
}