#include <iostream>
#include <map>
using namespace std;
map<string,string> mp;
int main() {
    mp["elephant"]="tiger";//键吃值
    mp["tiger"]="cat";
    mp["cat"]="mouse";
    mp["mouse"]="elephant";
    string a,b;cin>>a>>b;
    if(mp[a]==b){
        cout<<"win"<<endl;
    }
    else if(mp[b]==a){
        cout<<"lose"<<endl;
    }
    else {
        cout<<"tie"<<endl;
    }

}
// 64 位输出请用 printf("%lld")