Go: /*
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=2006&lang=jp
Keitai Message
*/

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

// 標準入力を取得するScannerのインスタンスを作成
var scanner = bufio.NewScanner(os.Stdin)

// 標準入力で各行を読み込みstringとして返す
func readLine() string {
	if scanner.Scan() {
		return scanner.Text()
	}
	return ""
}

func main() {
	// 1: . , ! ? (スペース)
	// 2: a b c
	// 3: d e f
	// 4: g h i
	// 5: j k l
	// 6: m n o
	// 7: p q r s
	// 8: t u v
	// 9: w x y z
	// 0: 確定ボタン

	// 改行から空白区切りに変更
	scanner.Split(bufio.ScanWords)
	line, _ := strconv.Atoi(readLine()) // 5行標準入力が続く

	table := []string{
		"",      // 0 index調整ためダミーデータ
		".,!? ", // 1
		"abc",   // 2
		"def",   // 3
		"ghi",   // 4
		"jkl",   // 5
		"mno",   // 6
		"pqrs",  // 7
		"tuv",   // 8
		"wxyz"}  // 9

	// 5行分の標準入力を格納するsliceを作成する
	messages := make([]string, 0, line)

	// sliceに標準入力の内容を格納する
	for i := 0; i < line; i++ {
		messages = append(messages, readLine()) // messages=[20 220 222220 44033055505550666011011111090666077705550301110 000555555550000330000444000080000200004440000]
	}

	// 各行毎に解析する
	for _, message := range messages { // message=000555555550000330000444000080000200004440000
		// 0で分割する
		messageSlice := strings.Split(message, "0") // messageSlice=[   55555555    33    444    8    2    444    ]
		for _, word := range messageSlice {
			if word == "" {
				// NOP.
				// 0をセパレーターにしているので空文字がsliceに格納されてい箇所がある
				// 何もしない
			} else { // word=55555555
				// 一文字取り出しコード値をASCII文字に変換する
				ascii := string((word[0])) // word[0]=5

				// ASCII文字からintへ変換する(tableのindexになる)
				number, _ := strconv.Atoi(ascii)

				// 入力回数をカウントする
				count := len(word) // 5

				// 同じ数字を続けて入力すると変化する文字はループすることを考慮する
				for count > len(table[number]) { // 5 > 3
					count -= len(table[number]) // 2
				}

				// キー配列
				keys := table[number]                   //jkl
				fmt.Printf("%s", string(keys[count-1])) //k
			}
		}
		fmt.Println() // 改行
	}
}

Python: moji_lis = [[".",",","!","?"," "],["a","b","c"],["d","e","f"],["g","h","i"],["j","k","l"],["m","n","o"],["p","q","r","s"],["t","u","v"],["w","x","y","z"]]
n = int(input())
for i in range(n):
    N_lis = list(input())
    N_lis = list(map(int,N_lis))
    
    a_0 = N_lis[0]
    n_num = 1
    moji = ""
    for j in range(1,len(N_lis)):

        a_1 = N_lis[j]
        
        if a_0 == a_1:
            n_num += 1
        else:
            if a_0 == 1:
                moji += moji_lis[0][(n_num - 1) % 5]
                
            elif a_0 == 6 or a_0 == 8:
                moji += moji_lis[a_0 - 1][(n_num - 1) % 4]
                
            elif a_0 != 0:
                moji += moji_lis[a_0 - 1][(n_num - 1) % 3]
                
        a_0 = a_1
        if a_1 == 0:
            n_num = 1
    print(moji)

Python: #!/usr/bin/env python
# -*- coding: utf-8 -*-

button = [[''],['.',',','!','?',' '], ['a','b','c'], ['d','e','f'], ['g','h','i'], ['j','k','l'], ['m','n','o'], ['p','q','r','s'], ['t','u','v'], ['w','x','y','z']]

n = int(input())
for i in range(n):
    inputStr = list(map(int,list(input())))
    count = 0
    for j in range(len(inputStr)):
        if inputStr[j] != 0:
            count += 1
        if inputStr[j] == 0 and j -1 >= 0 and  inputStr[j-1] != 0:
            print(button[inputStr[j-1]][(count-1)%len(button[inputStr[j-1]])],end='')
            count = 0
    print()

Python: button = [
    ["", "", ""],
    [".", ",", "!", "?", " "],
    ["a", "b", "c"],
    ["d", "e", "f"],
    ["g", "h", "i"],
    ["j", "k", "l"],
    ["m", "n", "o"],
    ["p", "q", "r", "s"],
    ["t", "u", "v"],
    ["w", "x", "y", "z"],
]

N = int(input())
for _ in range(N):
    S = ""
    count = 0
    l = list(input())
    for i in range(0, len(l)):
        if l[i] == "0":
            S += button[int(l[i - 1])][count-1]
            count = 0
        else:
            # print(l[i])
            count = (count + 1) % len(button[int(l[i])])
    print(S)

Python: alpha = [[], list(".,!? "), list("abc"), list("def"), list("ghi"),
         list("jkl"), list("mno"), list("pqrs"), list("tuv"), list("wxyz")]

n = int(input())
for _ in range(n):
    button = list(input())
    button = [int(b) for b in button]

    while 1:
        if button[0] == 0:
            button.pop(0)
        else:
            break

    ans = ""
    cnt = 0
    for i, b in enumerate(button):
        if b == 0 and button[i-1] != 0:
            ans += alpha[button[i-1]][(cnt-1) % len(alpha[button[i-1]])]
            cnt = 0
        elif b == 0:
            pass
        else:
            cnt += 1

    print(ans)

Python: K = '.,!? '
A = 'abc'
D = 'def'
G = 'ghi'
J = 'jkl'
M = 'mno'
P = 'pqrs'
T = 'tuv'
W = 'wxyz'
L = ['', K, A, D, G, J, M, P, T, W]


while 1:
	S = []
	n = input()
	if not '0' in n:
		print('')
	else:
		n = n.split('0')
		for ns in n:
			if ns == '':
				continue
			i = len(ns) % len(L[int(ns[0])])
			S += [[L[int(ns[0])], i-1]]
		for s in S:
			print(s[0][s[1]], end='')
		print('')

Python: a = ["" for i in range(10)]
a[1] = ".,!? "
a[2] = "abc"
a[3] = "def"
a[4] = "ghi"
a[5] = "jkl"
a[6] = "mno"
a[7] = "pqrs"
a[8] = "tuv"
a[9] = "wxyz"
num = int(input())
for count in range(num):
    s = input()
    b = ""
    c = '0'
    d = 0
    for i in s:
        if i=='0' :
            if c=='0': continue
            if c == '1':
                b += a[int(c)][d%5]
            elif c in "79":
                b += a[int(c)][d%4]
            else :
                b += a[int(c)][d%3]
            c = '0'
            d = 0
        if(c!=i):
            c = i
            d = 0
        else :
            d += 1
    print(b)

Python: a=[['.',',','!','?',' '],['a','b','c'],['d','e','f'],['g','h','i'],['j','k','l'],['m','n','o'],['p','q','r','s'],['t','u','v'],['w','x','y','z']]
for _ in range(int(input())):
    b=list(filter(lambda x: x!='',input().split('0')))
    for c in b:
        d=int(c[0])-1
        print(a[d][(len(c)-1)%len(a[d])],end='')
    print()

Python: moji_lis = [[".",",","!","?"," "],["a","b","c"],["d","e","f"],["g","h","i"],["j","k","l"],["m","n","o"],["p","q","r","s"],["t","u","v"],["w","x","y","z"]]
n = int(input())
for i in range(n):
    N_lis = list(input())
    N_lis = list(map(int,N_lis))
    
    a_0 = N_lis[0]
    n_num = 1
    moji = ""
    for j in range(1,len(N_lis)):

        a_1 = N_lis[j]
        
        if a_0 == a_1:
            n_num += 1
        else:
            if a_0 == 1:
                moji += moji_lis[0][(n_num - 1) % 5]
                
            elif a_0 == 7 or a_0 == 9:
        
                moji += moji_lis[a_0 - 1][(n_num - 1) % 4]
           
                
            elif a_0 != 0:
  
                moji += moji_lis[a_0 - 1][(n_num - 1) % 3]
                
        a_0 = a_1
        if a_1 == 0:
            n_num = 1
    print(moji)

Python: s = [0,['.',',','!','?',' '],['a','b','c'],['d','e','f'],['g','h','i'],['j','k','l'],['m','n','o'],['p','q','r','s'],['t','u','v'],['w','x','y','z']]
for _ in range(int(input())):
    l = list(filter(lambda x: x!='', input().split('0')))
    r = ''
    for d in l:
        i,j = int(d[0]),len(d)-1
        r += s[i][j%len(s[i])]
    print(r)

Python: import sys

litter = [""]
litter.append(list(" .,!? "))
litter.append(list(" abc"))
litter.append(list(" def"))
litter.append(list(" ghi"))
litter.append(list(" jkl"))
litter.append(list(" mno"))
litter.append(list(" pqrs"))
litter.append(list(" tuv"))
litter.append(list(" wxyz"))

n = input()
for count in range(n):
    ls = map(int, list(raw_input()))
    button, times = None, 0
    for i in ls:
        if i==0 :
            if button != None:
                sys.stdout.write(litter[button][times])
                button, times = None, 0
        else:
            button, times = i, times+1
            if times == len(litter[button]):
                times = 1
    sys.stdout.write('\n')