while 1:print["same","different"][cmp(*map(sorted,raw_input().split('==')))]