djfz-2020-s444507/TaskD05/run.py
2020-12-06 18:07:42 +01:00

14 lines
290 B
Python

import sys
import re
def replaceLetters(words):
result = words.group(1)
for i in words.group(2):
result += 'x'
return result
for line in sys.stdin:
replaceXin3rdPos = re.sub(r'^(\W*\w+\W+\w+\W+)(\w+)', replaceLetters, line, 1)
print(replaceXin3rdPos, end='')