djfz-2019-s426197/TaskA37/run.py

11 lines
280 B
Python
Raw Normal View History

2019-11-05 11:33:34 +01:00
import sys
import re
regex = re.compile('^((\+|0)([0-9]{2})) ([0-9]-[0-9]{3}-[0-9]{3}|[0-9]{3}-[0-9]{2}-[0-9]{2})$')
for line in sys.stdin:
if regex.match(line.replace('\n', '')):
print(regex.match(line.replace('\n', '')).group(3))
else:
print('<NONE>')