eolymp
bolt
Спробуйте наш новий інтерфейс для відправки розв'язків
Задачі

Game on Strings

Game on Strings

Recently, Etibar made a new game on strings. Then he taught this game to his smart students - Kamran and Khayyam. And now both of them play that game very well. You are given \textbf{3} strings. The players are playing the game on \textbf{1}^st and \textbf{2}^nd string. In each turn a player choose the first character of \textbf{1}^st or \textbf{2}^nd string and throw it out. If that character is match with the first character of \textbf{3}^rd string then he also throw that character out. After whose turn the \textbf{3}^rd string remains empty, that player wins the game. Kamran plays first and both play optimally. Output who wins the game. If No one wins, output Etibar. \InputFile In the first line you are given first string \textbf{S_1}. The next line contains second string \textbf{S_2}. The third line contains third string \textbf{S_3}. It is known that \textbf{1} ≤ |\textbf{S_1}|, |\textbf{S_2}|, |\textbf{S_3}| ≤ \textbf{100}. The strings contain only lowercase letters. \OutputFile Output who win the game. If no one wins, output Etibar.
Ліміт часу 0.5 секунд
Ліміт використання пам'яті 64 MiB
Вхідні дані #1
ab
bc
ab
Вихідні дані #1
Khayyam
Автор Mahammad Valiyev
Джерело Local Contest #2 Qafqaz University by Mahammad Valiyev