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