#include<bits/stdc++.h>
#define N 100000
using namespace std;

int stoi(char c){
  if('A'<=c&&c<='Z')return c-'A'+10;
  if('a'<=c&&c<='z')return c-'a'+36;
  return c-'0';
}

int main(){
  int n,p,num,ans=0;
  string m;
  cin>>n;
  while(n--){
    cin>>p>>m;
    num=0;
    for(int i=0;i<m.size();i++)
      num=num*p+stoi(m[i]);
    ans^=num;
  }
  if(ans)cout<<"win"<<endl;
  else cout<<"lose"<<endl;
  return 0;
}