S=input() f=S.find e=f('OOO') w=f('XXX') print((('West','East')[-1