n = gets.to_i
input = []
c_1 = [".",",","!","?"]
c_2 = ["a","b","c"]
c_3 = ["d","e","f"]
c_4 = ["g","h","i"]
c_5 = ["j","k","l"]
c_6 = ["m","n","o"]
c_7 = ["p","q","r","s"]
c_8 = ["t","u","v"]
c_9 = ["w","x","y","z"]
n.times do 
	input.push(gets.to_s.chomp)
end
#a = input[0].chars
input.each do |tmp|
	tmp_s = []
	str = []
	tmp_c = "a"
	tmp.each_char do |c|
		if c != "0"
			tmp_s.push(c)
		#elsif tmp_c = c &&c == "0"
		elsif c == "0" && tmp_c != "0"
			tmp_ss = tmp_s.join("")
			tmp_cnt = tmp_ss.length
			#puts tmp_cnt
			tmp_c = tmp_c.to_i
			if tmp_c == 1 || tmp_c == 7 || tmp_c == 9
				tmp_cnt %= 4
				tmp_cnt -= 1
				#puts tmp_cnt
				#print("tmp_cnt = ",tmp_cnt," tmp_c = ",tmp_c,"\n")
				if tmp_c == 1
					str.push(c_1[tmp_cnt])
				elsif tmp_c == 7
					str.push(c_7[tmp_cnt])
				else
					str.push(c_9[tmp_cnt])
				end
			else
				tmp_cnt %= 3
				tmp_cnt -= 1
				if tmp_c == 2
					str.push(c_2[tmp_cnt])
				elsif tmp_c == 3
					str.push(c_3[tmp_cnt])
				elsif tmp_c == 4
					str.push(c_4[tmp_cnt])
				elsif tmp_c == 5
					str.push(c_5[tmp_cnt])
				elsif tmp_c == 6
					str.push(c_6[tmp_cnt])
				elsif tmp_c == 8
					str.push(c_8[tmp_cnt])
				end
			end
			tmp_s = []
		end
		tmp_c = c
		#p tmp_ss
	end
	puts str.join("")
end