90 - The 7th Zhejiang Provincial Collegiate Programming Contest - A
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.
3 1983 06 06 1984 05 02 1983 05 07 1980 02 29 1991 01 01 1991 01 01
javaman cpcs same
Author: CAO, Peng
Source: The 7th Zhejiang Provincial Collegiate Programming Contest