s=input() e,w=s.find('O'*3),s.find('X'*3) print([['West','East'][sum([e