s=input() o=s.find("OOO") x=s.find("XXX") print([[[["West","East"][o