#include<iostream>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
string an,bn;
int ap,bp;
cin>>an>>ap>>bn>>bp;
if(ap==bp)cout<<"tie\n";
else cout<<(ap>bp?an:bn)<<" WIN!\n";
return 0;
}