djfz-2020-s444399/TaskC44/run

16 lines
354 B
Plaintext
Raw Normal View History

2020-11-15 23:08:11 +01:00
#!/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>")