djfz-2020-s444507/TaskC47/run.py

19 lines
318 B
Python

import re
import sys
pattern = re.compile(r"(#{1}(?![0-9])([A-Z]|[a-z]|\d)+)")
for line in sys.stdin:
x = re.findall(pattern, line)
output = []
for g in x:
output.append(g[0])
output_str = ";".join(output)
if not output_str:
print("<NONE>")
else:
print(output_str)