#include <stdio.h>

#define HOME 0
#define VISITOR 1

int main(void)
{
    char name[31];
    int scores[2][50];
    int i = 0, size;

    scanf("%s", name);
    scanf("%d", &scores[HOME][i]);
    while (scores[HOME][i] != -1) {
        scanf("%d", &scores[VISITOR][i]);
        i++;
        scanf("%d", &scores[HOME][i]);
    }

    size = i;
    for (i = size - 1; i >= 0; i--) {
        printf("%2d - %2d", scores[HOME][i], scores[VISITOR][i]);
        if (scores[HOME][i] > scores[VISITOR][i]) {
            printf(" %s won!", name);
        } 
        if (scores[HOME][i] == scores[VISITOR][i]) {
            printf(" Tie Game");
        }
        printf("\n");
    }
    return 0;
}