import java.util.Scanner;
public class Test3 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Student student = new Student(sc.next(),sc.nextInt());
String[] name = new String[3];
for (int i = 0; i < 3; i++) {
name[i] =sc.next();
}
student.setMycourse(name);
System.out.println(student);
}
}
class SchoolMember{
protected String name;
public SchoolMember(String name) {
this.name = name;
}
public SchoolMember() {
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
class Student extends SchoolMember{
private int grade;
Course[] mycourse = new Course[3];
public Student(String name, int grade) {
super(name);
this.grade = grade;
}
public Student() {
}
public void setMycourse(String[] mycoursename) {
for (int i = 0; i < 3; i++) {
mycourse[i] = new Course(mycoursename[i]);
}
}
@Override
public String toString() {
return name+
"\n"+grade+
"\n"+mycourse[0].getCoursename()+
"\n"+mycourse[1].getCoursename()+
"\n"+mycourse[2].getCoursename();
}
}
class Course{
String coursename;
public Course() {
}
public Course(String coursename) {
this.coursename = coursename;
}
public String getCoursename() {
return coursename;
}
public void setCoursename(String coursename) {
this.coursename = coursename;
}
}