djfz-2020-s444399/TaskC44/run
Kijowski Michał 1b89be1bb4 zadanie #2
2020-11-15 23:08:11 +01:00

16 lines
354 B
Python
Executable File

#!/usr/bin/python3
import sys
import re
for input in sys.stdin.readlines():
answer = re.search('^[A-ZĆŁŚŹŻ][a-ząćłśźż]*a [A-ZĆŁŚŹŻ][a-ząćłśźż]+$',input);
if answer:
answer2 = re.search("^(Kosma|Jarema)", answer.group());
if answer2:
print("<NONE>")
else:
print(answer.group().split(" ")[1])
else:
print("<NONE>")