Limits 1s, 512 MB

You must have heard the name of Metropolitan University. As soon as a student gets admitted there, the university provides him/her a nine digits ID (e.g. 131-115-100).

If you notice carefully, you will find that this is not just a random number. The first two digits define the year of admission, and the third digit indicates the term of admission. 1 for Spring, 2 for Summer and 3 for Autumn. The next three digits indicate the name of the department.

  • 115 for CSE

  • 141 for EEE

  • 116 for BBA

  • 117 for LLB

  • 114 for English and

  • 111 for Economics

The rest of the digits indicate the roll number of the student.

For instance, Nasif’s ID is 171-115-249. Here 171 means his academic year is Spring 2017. 115 means he is a student of CSE, and 249 is his class roll.

Your task is to write a program that prints the department's name and students’ academic year from given ID numbers.

Input

The first line contains a single integer NN (1N10001 ≤ N ≤ 1000).

The next NN lines contain NN ID numbers in "XXX-XXX-XXX" format.

Output

Print NN lines of output with the name of the department and academic year.

Sample

InputOutput
3
131-115-081
171-116-005
162-115-144
CSE Spring 2013
BBA Spring 2017
CSE Summer 2016

Submit

Login to submit.

Statistics

88% Solution Ratio
sarwarITEarliest, Jul '17
MariaFar_45Fastest, 0.0s
sarwarITLightest, 131 kB
Nusab19Shortest, 188B
Toph uses cookies. By continuing you agree to our Cookie Policy.