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