#include <bits/stdc++.h>
using namespace std;
int main() {
  char s1[25], s2[25];
  while (cin >> s1 >> s2) {
    int res = 0;
    for (int i = 0; s1[i] != '\0'; i += 2) {
      if (s1[i] != s2[i]) {
        if ((s1[i] == '8' && s2[i] == '[') || (s1[i] == '[' && s2[i] == '(') ||
            (s1[i] == '(' && s2[i] == '8'))
          res++;
        else
          res--;
      }
    }
    if (res > 0)
      cout << "TEAM 1 WINS" << endl;
    else if (res < 0)
      cout << "TEAM 2 WINS" << endl;
    else
      cout << "TIE" << endl;
  }
  return 0;
}
