19 lines
318 B
Python
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)
|