问题3405--Who is Older?

3405: Who is Older?

[命题人 : ]
时间限制 : 1.000 sec  内存限制 : 64 MB

题目描述

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

输入

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 "yyyy mm dd". You may assume the birthdays are both valid.

输出

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

样例输入 Copy

3
1983 06 06 1984 05 02
1983 05 07 1980 02 29
1991 01 01 1991 01 01

样例输出 Copy

javaman
cpcs
same