str_n = input('请输入内容:')
#将输入的内容转化为列表
str_lis = list(str_n)
#读取列表内容
for i in str_lis:
#将输入的小写转化为大写,由此达到大小写都可使用
if i.isalpha():
new_i = i.upper()
if ( new_i == 'A')or(new_i == 'B')or(new_i == 'C'):print(2,end="")
if ( new_i == 'D')or(new_i == 'E')or(new_i == 'F'):print(3,end="")
if ( new_i == 'G')or(new_i == 'H')or(new_i == 'I'):print(4,end="")
if ( new_i == 'J')or(new_i == 'K')or(new_i == 'L'):print(5,end="")
if ( new_i == 'M')or(new_i == 'N')or(new_i == 'O'):print(6,end="")
if ( new_i == 'P')or(new_i == 'Q')or(new_i == 'R'):print(7,end="")
if ( new_i == 'S')or(new_i == 'T')or(new_i == 'U'):print(8,end="")
if ( new_i == 'V')or(new_i == 'W')or(new_i == 'X')or(new_i == 'Y')or( new_i == 'Z'):print(4,end="")
else:print(" ",end="")
#输入数字将以原来的数字输出
elif i.isdigit():print(i," ",end="")
#其他字符暂时以空格表示
else:print(" ",end="")