import List m@main=getLine>>=putStrLn.f.span(/='=')>>m f(a,_:_:b)|a\\b==b\\a="same"|0<1="different"