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='')