djfz-2020-s444344/TaskD00/run

21 lines
499 B
Plaintext
Raw Normal View History

2020-12-02 19:09:06 +01:00
#!/usr/bin/python3
import sys
import re
def fromNumber(m):
m = re.sub(r'0', 'a' , m.group(0))
m = re.sub(r'1', 'b' , m)
m = re.sub(r'2', 'c' , m)
m = re.sub(r'3', 'd' , m)
m = re.sub(r'4', 'e' , m)
m = re.sub(r'5', 'f' , m)
m = re.sub(r'6', 'g' , m)
m = re.sub(r'7', 'h' , m)
m = re.sub(r'8', 'i' , m)
m = re.sub(r'9', 'j' , m)
return str(m)
for line in sys.stdin.readlines():
temp=re.sub(r'\d{4}', fromNumber ,line)
print(temp.strip())