s=input() c_e=0 c_w=0 for i in s: if i=='0': c_e+=1 else: c_w+=1 if c_e>c_w: print('EAST') elif c_e