total = int(input())

two = ["abc"]
three = ["def"]
four = ["ghi"]
five = ["jkl"]
six = ["mno"]
seven = ["pqrs"]
eight = ["tuv"]
nine = ["wxyz"]

while total != 0:
    words = input()
    try:
        words = words.split(" ")
        final_string = ""
        
    except:
        word = words
        for letter in word:
            pass

    print(final_string)

    total -= 1