Time Limit: Java: 1000 ms / Others: 1000 ms
Memory Limit: Java: 32768 KB / Others: 32768 KB
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.