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