题目描述
Problem Description
A-kun, who belongs to a certain university, lost his memory one day.
Your task is to create a program that determines the year A-kun enrolled and his status from the student ID written on his student card.
It is known that the student ID at A-kun's university follows these rules:
- It is an 8-character string.
- The first 2 characters are digits only and represent the last 2 digits of the enrollment year.
- The 3rd character, if
B, indicates an undergraduate course; ifM, a master's course; and ifD, a doctoral course. - The remaining 5 characters are digits only.
Input Format
The input is given from the standard input in the following format:
$ S $
- The first line contains a string $ S $ representing A-kun's student ID.
- $ S $ satisfies the following constraints:
- $ |S|=8 $. Here, $ |S| $ denotes the length of the string $ S $.
- The 3rd character is one of
B,M, orD. - All characters except the 3rd are one of the digits
0,1,2,3,4,5,6,7,8,9.
Output Format
- Output A-kun's status and the last 2 digits of the enrollment year separated by a space in one line. Do not forget to add a newline.
- For the status, output
Bachelorif it is an undergraduate course,Masterif it is a master's course, andDoctorif it is a doctoral course. - Refer to the samples for more details.
Sample Input and Output
Sample Input #1
12B34567
Sample Output #1
Bachelor 12
Sample Input #2
00M00000
Sample Output #2
Master 00
Sample Input #3
13D10007
Sample Output #3
Doctor 13
Notes/Hints
Sample Explanation 1
It seems that A-kun is an undergraduate student who enrolled in the year 12.
Sample Explanation 2
It seems that A-kun is a master's student who enrolled in the year 00.
Sample Explanation 3
It seems that A-kun is a doctoral student who enrolled in the year 13.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
12B34567
样例输出
Bachelor 12