2021-10-17 14:31:09 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
import random
|
2023-11-23 22:59:09 +01:00
|
|
|
import sys
|
2021-10-17 14:31:09 +02:00
|
|
|
|
|
|
|
for line in sys.stdin:
|
|
|
|
nl = ""
|
|
|
|
word = ""
|
|
|
|
for c in line:
|
|
|
|
if c.isalpha():
|
|
|
|
word += c
|
|
|
|
else:
|
|
|
|
if len(word) > 3:
|
|
|
|
wrd = list(word)[1:-1]
|
|
|
|
random.shuffle(wrd)
|
|
|
|
nl += word[0] + "".join(wrd) + word[-1]
|
|
|
|
else:
|
|
|
|
nl += word
|
|
|
|
word = ""
|
|
|
|
nl += c
|
|
|
|
print(nl, end="")
|