djfz-2020-s444344/TaskC44/run
Zofia Bączyk 5fa160e9dd atempt 1
2020-11-22 15:58:13 +01:00

14 lines
363 B
Python

#!/usr/bin/python3
import sys
import re
for line in sys.stdin:
if re.match(r'([A-ZĆŚŁŹŻ][a-ząćęłńóśźż]*[a]\s([A-ZĆŚŁŹŻ][a-ząćęłńóśźż]+)+$)',line):
if re.match(r'(Kosma|Jarema)',line):
print("<NONE>")
else:
name = line.split()
print(name[len(name)-1])
else: print("<NONE>")