Who is Older?

Time Limit
1s
Memory Limit
32768KB
Judge Program
Standard
Ratio(Solve/Submit)
80.00%(4/5)
Description:

Javaman and cpcs are arguing who is older. Write a program to help them.

Input:

There are multiple test cases. The first line of input is an integer T (0 < T <= 1000) indicating the number of test cases. Then T test cases follow. The i-th line of the next T lines contains two dates, the birthday of javaman and the birthday of cpcs. The format of the date is " mm dd". You may assume the birthdays are both valid.

Output:

For each test case, output who is older in a single line. If they have the same birthday, output "same" (without quotes) instead.

Sample Input:
3
1983 06 06 1984 05 02
1983 05 07 1980 02 29
1991 01 01 1991 01 01
Sample Output:
javaman
cpcs
same

Submit