#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[3][3] = {{0, 1, -1}, {-1, 0, 1}, {1, -1, 0}};
  string s, c;
  cin >> s >> c;
  int n = 0;
  for (int i = 0; i < s.size(); i += 2) n += a[s[i] / 41][c[i] / 41];
  if (n == 0)
    cout << "TIE";
  else if (n < 0)
    cout << "TEAM 2 WINS";
  else
    cout << "TEAM 1 WINS";
  return 0;
}
