object Main extends App {

  import scala.io.StdIn._
  val n = readInt
  implicit val memo = Array.tabulate(19){_ ⇒ None: Option[Int]}
  implicit val memo2 = Array.tabulate(19){len ⇒ Array.tabulate(len + 1){_ ⇒ None: Option[List[Int]]}}
  val numbers = Array.tabulate(n){_ ⇒
    val arg = readLine.trim.split(' ')
    g(arg.tail.headOption.getOrElse("").asBase(arg.head.toInt), 0)
  }
  if (numbers.foldLeft(0)(_^_) != 0)
    println("win")
  else println("lose")
  def g(number: Int, current: Int): Int = {
    if (number == 0) g(current)
    else if (number % 2 == 1) g(number / 2, current + 1)
    else if (current == 0) g(number / 2, 0)
    else g(current) ^ g(number / 2, 0)
  }
  def g(length: Int)(implicit memo: Array[Option[Int]]): Int = {
    if (length == 0) 0
    else memo(length) match {
      case Some(r) ⇒ r
      case None ⇒
        val nextState = (0 until length).flatMap(max ⇒ separation(length - max - 1, max)(memo2).map(_ ^ g(max))).distinct.sorted
        var find = false
        var prev = -1
        for (n ← nextState if !find) {
          if (prev + 1 != n) find = true
          prev = prev + 1
        }
        if (!find) prev += 1
        memo(length) = Some(prev)
        prev
    }
  }
  def separation(length: Int, max: Int)(implicit memo2: Array[Array[Option[List[Int]]]]): List[Int] = {
    if (length <= 0 || max == 0) List(0)
    else memo2(length)(math.min(length, max)) match {
      case Some(l) ⇒ l
      case None ⇒ (0 to math.min(length, max)).flatMap(nextMax ⇒ separation(length - nextMax - 1, nextMax).map(_ ^ g(nextMax))).toList.distinct.also(l ⇒ memo2(length)(math.min(length, max)) = Some(l))
    }
  }
  implicit class AsPrimeBase(val value: String) extends AnyVal{
    def asBase(base: Int): Int = {
      value.map{
        case c if c.isDigit ⇒ c.asDigit
        case c if c.isUpper ⇒ c - 'A' + 10
        case c ⇒ c - 'a' + 36
      }.foldLeft(0){(a, b) ⇒ a * base + b}
    }
  }
  implicit class Extension[T](val value :T) extends AnyVal {
    @inline
    def let[A](@inline func: T ⇒ A): A = func(value)
    @inline
    def also(@inline func: T ⇒ Unit): T = {func(value); value}
    @inline
    def takeIf(@inline predicate: T ⇒ Boolean): Option[T] = Some(value).filter(predicate)
  }
}
