djfz-2019-s426197/TaskA47/run.py
2019-11-05 11:59:16 +01:00

18 lines
394 B
Python

import sys
import re
regex = re.compile('(#[A-Za-z][A-Za-z0-9]*)')
for line in sys.stdin:
hashtags = list(regex.findall(line.replace('\n', '')))
if hashtags:
answer = ''
for i, tag in enumerate(hashtags):
if i == 0:
answer += tag
else:
answer += ';' + tag
print(answer)
else:
print('<NONE>')