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