djfz-2020-s444344/TaskD05/run

9 lines
218 B
Plaintext
Raw Permalink Normal View History

2020-12-06 18:12:54 +01:00
#!/usr/bin/python3
import sys
import re
for line in sys.stdin.readlines():
print((re.sub('(([\W]*[\w\d]+[\W]+[\w\d]+[\W]+)([\w\d]+)(.*$))', lambda m: m.group(2)+'x'*len(m.group(3))+m.group(4), line)).strip('\n'))