while 1:print-hash(raw_input())%503/15%2*'same'or'different'