# Arup Guha
# 7/19/2013
# Solution to 2013 SI@UCF Practice Programming Contest Problem: Which Club?

def main():

    choices = ["Engineering Team", "German Club", "Programming Team"]

    myFile = open("club.in", "r")
    numCases = int(myFile.readline())

    # Go through each case.
    for i in range(numCases):

        # Get data
        tokens = myFile.readline().split()
        eng = int(tokens[0])
        ger = int(tokens[1])
        pro = int(tokens[2])

        # Check each condition and print.
        if eng >= ger and eng >= pro:
            print(choices[0])
        elif ger >= pro:
            print(choices[1])
        else:
            print(choices[2])

    myFile.close()

main()
        

        
