S=input() o=S.find("OOO")%100 x=S.find("XXX")%100 print("East" if o