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: phone = [[], [".", ",", "!", "?", " "], ["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) :
    message = list(input().split("0"))
    for j in range(len(message)) :
        if message[j] != "" :
            push = list(message[j])
            num = int(push[0])
            kaisuu = len(push) % len(phone[num])
            if kaisuu == 0 :
                print(phone[num][-1], end="")
            else :
                print(phone[num][kaisuu-1], end="")
    print()

Python: d=[1,'.,!? ','abc','def','ghi','jkl','mno','pqrs','tuv','wxyz'];[print(''.join(d[int(s[0])][len(s)%len(d[int(s[0])])-1]if s!=''else''for s in t))for t in[input().split('0')for _ in[0]*int(input())]]

Python: #!/usr/bin/python3

def atoi(c):
    return ord(c) - ord('0')

table = [(), #dummy
        ('.',',','!','?',' '),\
        ('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):
    digits = list(input())
    s = ""
    c = ''
    m = 0
    for d in digits:
        if d == '0':
            s += c
            c = ''
            m = 0
        else:
            c = table[atoi(d)][m]
            m = (m + 1) % len(table[atoi(d)])
    print(s)

Python: 
keymap = [
    [".",",","!","?"," "],
    ["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):
    keys = str(input())
    message = ""
    currentChar = ""
    currentKey = "X"
    push_counter = 0
    for key in keys:
        if key == "0":
            message += currentChar
            currentChar = ""
            currentKey = "0"
            continue
        if currentKey == key:
            push_counter += 1
        else:
            push_counter = 0
            currentKey = key
        key_int = int(currentKey) - 1
        count = push_counter % len(keymap[key_int])
        currentChar = keymap[key_int][count]
    print(message)

Python: n=int(input())
k=[[],[".",",","!","?"," "],["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 i in range(n):
  b=input()
  #print(b)
  S=[]
  count=0
  for i in range(len(b)):
    if b[i]=="0":
      if count==0:
        pass
      else:
        if b[i-1]=="1":
          co=count%5-1
          S.append(k[1][co])
          count=0
        elif b[i-1]=="2":
          co=count%3-1
          S.append(k[2][co])
          count=0
        elif b[i-1]=="3":
          co=count%3-1
          S.append(k[3][co])
          count=0
        elif b[i-1]=="4":
          co=count%3-1
          S.append(k[4][co])
          count=0
        elif b[i-1]=="5":
          co=count%3-1
          S.append(k[5][co])
          count=0
        if b[i-1]=="6":
          co=count%3-1
          S.append(k[6][co])
          count=0
        if b[i-1]=="7":
          co=count%4-1
          S.append(k[7][co])
          count=0
        if b[i-1]=="8":
          co=count%3-1
          S.append(k[8][co])
          count=0
        if b[i-1]=="9":
          co=count%4-1
          S.append(k[9][co])
          count=0
    else:
      count+=1
    
  for i in range(len(S)):
    print(S[i],end="")
  print("")

Python: import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**3
eps = 1.0 / 10**10
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    rr = []
    n = I()
    a = [S() for _ in range(n)]
    d = {}
    d[1] = '.,!? '
    d[2] = 'abc'
    d[3] = 'def'
    d[4] = 'ghi'
    d[5] = 'jkl'
    d[6] = 'mno'
    d[7] = 'pqrs'
    d[8] = 'tuv'
    d[9] = 'wxyz'
    for s in a:
        r = ''
        i = -1
        c = 0
        for t in s:
            tc = int(t)
            if tc == 0:
                if c > 0:
                    r += d[c][i%len(d[c])]
                i = -1
                c = 0
            else:
                c = tc
                i += 1
        rr.append(r)

    return '\n'.join(map(str, rr))


print(main())

Python: keys = {
    '1': '.,!? ',
    '2': 'abc',
    '3': 'def',
    '4': 'ghi',
    '5': 'jkl',
    '6': 'mno',
    '7': 'pqrs',
    '8': 'tuv',
    '9': 'wxyz',
}

def solve_testcase():
    s = input().split('0')
    res = ''
    for s0 in s:
        if not s0: continue
        c = s0[0]
        v = keys[c]
        res += v[(len(s0)-1) % len(v)]

    print(res)

def main():
    n = int(input())
    for _ in range(n): solve_testcase()

main()

Python: n = int(input())
string = ["", ".,!?", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"]
for i in range(n):
    s = input()
    count = 0
    num = int(s[0])
    for c, c1 in zip(s, s[1:]):
        if c == c1:
            count += 1
        else:
            if num != 0:
                print(string[num][count % len(string[num])], end="")
            else:
                pass
            num = int(c1)
            count = 0
    print()