package main
import (
"bufio"
"fmt"
"os"
"strings"
)
func main() {
sc := bufio.NewScanner(os.Stdin)
sc.Scan()
s := strings.Fields(sc.Text())
s1 := s[0]
s2 := s[1]
if win(s1, s2) {
fmt.Print("win")
} else if win(s2, s1) {
fmt.Print("lose")
} else {
fmt.Print("tie")
}
}
func win(s1, s2 string) bool {
if s1 == "elephant" && s2 == "tiger" {
return true
} else if s1 == "tiger" && s2 == "cat" {
return true
} else if s1 == "cat" && s2 == "mouse" {
return true
} else if s1 == "mouse" && s2 == "elephant" {
return true
}
return false
}