#include <bits/stdc++.h>
using namespace std;
int sign(char x, char y) {
  if (x == y) {
    return 0;
  }
  if (x == '8' && y == '[' || x == '[' && y == '(' || x == '(' && y == '8') {
    return 1;
  }
  return -1;
}
int main() {
  string a, b;
  cin >> a >> b;
  int x = 0, y = 0;
  for (int i = 0; i < a.size(); i += 2) {
    int p = sign(a[i], b[i]);
    if (p == 1) {
      x++;
    }
    if (p == -1) {
      y++;
    }
  }
  if (x == y) {
    cout << "TIE";
  }
  if (x > y) {
    cout << "TEAM 1 WINS";
  } else if (x < y) {
    cout << "TEAM 2 WINS";
  }
  return 0;
}
