S=input() e=w=1 while len(S)>2 and e and w: x=S[:3] e,w=x!='OOO',x!='XXX' S=S[1:] print((('East','West')[w