jezyki-formalne-i-zlozonosc.../TaskC45_TODO/solution.py

10 lines
276 B
Python
Raw Normal View History

2025-01-06 17:35:59 +01:00
import re
import sys
for line in sys.stdin:
match = re.match(r'^([A-ZĆŁŚŹŻ][a-ząęóćłśńźż]*[b-ząęóćłśńźż]|Kosma|Jarema)\s([A-ZĆŁŚŹŻ][a-ząęóćłśńźż]+)$', line)
if match:
print(match.group(2))
else:
print("<NONE>")