djfz-2020-s444344/TaskC44/run

14 lines
363 B
Plaintext
Raw Normal View History

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