import std.stdio;
import std.conv;
import std.string;
import std.typecons;
import std.algorithm;
import std.array;
import std.range;
import std.math;
import std.container;
import std.bigint;

void main()
{
    auto str1 = readln.chomp;
    auto str2 = readln.chomp;
    int s1, s2;
    
    for (int i; i < str1.length; i+=2) {
        if (str1[i] == '(' && str2[i] == '8') s1++;
        else if (str1[i] == '8' && str2[i] == '[') s1++;
        else if (str1[i] == '[' && str2[i] == '(') s1++;
        else if (str2[i] == '(' && str1[i] == '8') s2++;
        else if (str2[i] == '8' && str1[i] == '[') s2++;
        else if (str2[i] == '[' && str1[i] == '(') s2++;
    }
    if (s1 > s2) "TEAM 1 WINS".writeln;
    else if (s1 < s2) "TEAM 2 WINS".writeln;
    else "TIE".writeln;
}