package mobile;
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Student[] students=new Student[4];
Scanner sc=new Scanner(System.in);
int in=sc.nextInt();sc.nextLine();
for(int i=0;i<in;i++){
int a=sc.nextInt();sc.nextLine();
String b=sc.nextLine();
int c=sc.nextInt();sc.nextLine();
int d=sc.nextInt();sc.nextInt();
students[i]=new Student(a,b,c,d);
}
int input1=sc.nextInt();sc.nextLine();
Student res1=findStudentWithMaximumAge(students);
System.out.println("id-"+res1.id);
System.out.println("name-"+res1.name);
System.out.println("marks-"+res1.marks);
System.out.println("age-"+res1.age);
Student res2=searchStudentById(students,input1);
if(res2==null)
{
System.out.println("no Students found with mention attribute");
}
else
{
System.out.println("id-"+res2.id);
System.out.println("name-"+res2.name);