Guest names
Task
The user enters guest names in the form Name Surname, each on its own line, until they enter -1.
The program sorts the guests: a woman is anyone whose **surname ends in ová or ova** (letter case does not matter), everyone else is a man. Then it prints the line zeny: (women), below it the women's names in alphabetical order, the line muzi: (men) and below it the men's names in alphabetical order (each name on its own line; sort them with sorted).
Examples
Input
Peter Novak Jana Novakova Anna Kovacova Marek Horvath -1
Expected output
zeny: Anna Kovacova Jana Novakova muzi: Marek Horvath Peter Novak
After you submit, 4 hidden tests will also check your solution: names with diacritics, men only, no guests, capital letters.
Python starts the first time you run code.
Ctrl+Enter runs the program. Tab indents. Press Esc, then Tab, to leave the editor.
Input (stdin)
Each line = one call to input().
Output
Hints
Try it yourself first. Each hint reveals a little more - and lowers the reward a little.
Signed out, hints are free - but no XP is awarded either.
Solution
The solution unlocks after the last hint.