#include <bits/stdc++.h>
using namespace std;
int sum1 = 0, sum2 = 0;
string s, s1;
void komand() {
  for (int i = 0; i < s.length(); i += 2) {
    if (((s[i] == '[' && s1[i] == '(') || (s[i] == '(' && s1[i] == '8')) ||
        (s[i] == '8' && s1[i] == '['))
      sum1++;
    else if (s[i] != s1[i])
      sum2++;
  }
}
int main() {
  cin >> s >> s1;
  komand();
  if (sum1 > sum2)
    cout << "TEAM 1 WINS";
  else if (sum1 < sum2)
    cout << "TEAM 2 WINS";
  else
    cout << "TIE";
}
