nn, nm = input().split() game = ["elephant","tiger","cat","mouse"] idn, idm = game.index(nn), game.index(nm) if idn==3 and idm==0 or idn+1==idm: print('win') elif idn==0 and idm==3 or idn-1==idm: print('lose') else: print('tie')