djfz-2023-s473575/TaskF05/run.py
2024-01-07 12:16:30 +01:00

13 lines
197 B
Python

import re
import sys
for line in sys.stdin:
stripped_line = line.strip()
print(re.sub(r'(\b\w+\b\s+\b\w+\b\s+)(\b\w+\b)', r'\1' + 'x' * len(re.findall(r'\w', line)), line, count=1))