~/algor $ cat problems/case-kozirli-karta
Trump card
A card is given by its value $N$ and suit $M$. Values: $6$ — olti (six), $7$ — yetti (seven), $8$ — sakkiz (eight), $9$ — to'qqiz (nine), $10$ — o'n (ten), $11$ — valet (jack), $12$ — dama (queen), $13$ — qirol (king), $14$ — tuz (ace). Suits: $1$ — g'isht (diamonds), $2$ — olma (hearts), $3$ — chillak (clubs), $4$ — qarg'a (spades). The first player has played the card $(N_{1}; M_{1})$, the second wants to beat it with the card $(N_{2}; M_{2})$; $K$ is the trump suit. The second card beats the first if both cards are of the same suit and $N_{2} > N_{1}$, or if the second card is a trump and the first is not. Otherwise the first card wins. Print the name of the winning card: the value first, then the suit.
Input
One line with five integers: $N_{1}$, $M_{1}$, $N_{2}$, $M_{2}$ and $K$.
Output
One line with the name of the winning card: the value word and the suit word separated by one space (for example, dama olma).
Note
$6 \le N_{1}, N_{2} \le 14$
$1 \le M_{1}, M_{2}, K \le 4$
The two cards are different.
Examples
10 2 12 2 1
dama olma
14 3 6 1 1
olti g'isht