s=input().split()
def f(a,b):
    if a=='elephant' and b=='tiger':
        return True
    elif a=='tiger' and b=='cat':
        return True
    elif a=='cat' and b=='mouse':
        return True
    elif a=='mouse' and b=='elephant':
        return True
if f(s[0],s[1]):
    print('win')
else:
    if f(s[1],s[0]):
        print('lose')
    else:
        print('tie')