exec"print['same','different'][cmp(*map(sorted,raw_input().split('==')))];"*9