jfz-2023-s473616/TaskF05/run.py

15 lines
360 B
Python
Raw Normal View History

2024-01-21 21:43:56 +01:00
import re
if __name__ == "__main__":
while True:
try:
line = input()
if not line:
break
result = re.sub(r'(\b\w+\b) (\b\w+\b) (\b\w+\b)', lambda match: f'{match.group(1)} {match.group(2)} {"x" * len(match.group(3))}', line)
print(result)
except EOFError:
break