13 lines
284 B
Python
Executable File
13 lines
284 B
Python
Executable File
#!/usr/bin/python3
|
|
|
|
import sys
|
|
import re
|
|
|
|
for input in sys.stdin.readlines():
|
|
answer = re.sub('(([\W]*[\w\d]+[\W]+[\w\d]+[\W]+)([\w\d]+)(.*$))', lambda match: match.group(2)+'x'*len(match.group(3))+match.group(4), input)
|
|
if answer:
|
|
print(answer[:-1])
|
|
else:
|
|
print(input[:-1])
|
|
|