14 lines
363 B
Python
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>")
|