S=input() count=0 counter=0 for x in S: if x[0]=='O': count+=1 if count==3: print('East') break else: count=0 break if x[0]=='X': counter+=1 if counter==3: print('West') break else: counter=0