Java Person Teacher 1
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Implement a class Person.
Implement a class Teacher that extends Person.
class Person { protected String Surname, Name; protected int Age; Person(String Surname, String Name, int Age) // Constructor public String toString() // print Surname Name Age } class Teacher extends Person { protected String Subject; protected int Salary; Teacher(String Surname, String Name, int Age, String Subject, int Salary) // Constructor public String toString() // print Surname Name Age Subject Salary }
Input
Each line contains one of two types of people in the next format:
Person Surname Name Age
Teacher Surname Name Age Subject Salary
Output
For each person print in one line its data.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 52%