Two powerful magicians “The king of fire” and “The hero of ice” are fighting each other to conquer the world. The winner will be the one who is the smarter and…a bit more successful.
The fight between two greatest magicians involves a lot of strategy because magicians can cast only limited amount of spells during each moment of time.
You support the king of fire just because the summer has just ended and you want to swim in the sea and to play volleyball in the beach… Ah, these good summer days! It may be possible again with the power of fire!
Each magician is characterized by _hp_ (health points), _atk_ (the strength of the attack), _def_ (the defence abilities). Each spell is one of the following types:
Opponent loses the dealt damage points from his hp. If player’s hp becomes less than or equal to 0 he is considered dead and his opponent is a winner.
Each player starts with hp = 10, atk = 0, def = 0. Luckily the king of fire moves first. It may increase our chances!
Each player has a sequence of 10 spells. He can reuse the same spell again. During the first turn a magician can use the first 5 spells, during the second - the first 6 spells and so on…During the turn a magician can cast only one spell.
Note: assume that both magicians are very wise and don’t make mistakes, i.e. they play optimally well. It means that a magician tries to minimize the number of turns if it is possible to win. If it is impossible to win, then a magician tries to maximize the number of turns.
Note: it is guaranteed that the winner exists and the game ends in at most 12 turns (that’s it, at most 6 turns for one player).
The first line contains the number of test cases _T_ (0 ≤ T ≤ 20). The first 10 lines of each test case contain the spells of the king of fire (“_Heal x_”, “_Atk x_”, “_Def x_”, “_HIT!_”), 0 ≤ x ≤ 5. The other 10 lines of each test case contain the spells of the hero of ice (“_Heal x_”, “_Atk x_”, “_Def x_”, “_HIT!_”), 0 ≤ x ≤ 5.
For each test case output one line containing “_Case #tc: status turn_”, where _tc_ is the number of the test case (starting from 1), _status_ is “win” or “lose” (“win” if the king of fire wins, “lose” otherwise), _turn_ is the turn in which the final hit was made.
## Input
The first line contains the number of test cases _T_ (0 ≤ T ≤ 20). The first 10 lines of each test case contain the spells of the king of fire (“_Heal x_”, “_Atk x_”, “_Def x_”, “_HIT!_”), 0 ≤ x ≤ 5. The other 10 lines of each test case contain the spells of the hero of ice (“_Heal x_”, “_Atk x_”, “_Def x_”, “_HIT!_”), 0 ≤ x ≤ 5.
## Output
For each test case output one line containing “_Case #tc: status turn_”, where _tc_ is the number of the test case (starting from 1), _status_ is “win” or “lose” (“win” if the king of fire wins, “lose” otherwise), _turn_ is the turn in which the final hit was made.
[samples]
**Definitions**
Let $ T \in \mathbb{Z} $ be the number of test cases, $ 0 \leq T \leq 20 $.
For each test case $ k \in \{1, \dots, T\} $:
- Let $ F_k = (s_{k,1}, \dots, s_{k,10}) $ be the sequence of 10 spells for the **King of Fire**.
- Let $ I_k = (s'_{k,1}, \dots, s'_{k,10}) $ be the sequence of 10 spells for the **Hero of Ice**.
Each spell is one of:
- `Heal x`: restores $ x $ HP to caster ($ 0 \leq x \leq 5 $)
- `Atk x`: increases caster’s attack by $ x $ ($ 0 \leq x \leq 5 $)
- `Def x`: increases caster’s defense by $ x $ ($ 0 \leq x \leq 5 $)
- `HIT!`: deals damage equal to caster’s current attack to opponent
Initial state for both players: $ \text{hp} = 10 $, $ \text{atk} = 0 $, $ \text{def} = 0 $.
King of Fire moves first.
On turn $ t \in \{1, 2, \dots, 12\} $:
- The active player can use any of the first $ \min(5 + \lceil t/2 \rceil, 10) $ spells from their sequence.
- Only one spell is cast per turn.
**Constraints**
1. Game ends in at most 12 turns.
2. A player dies when $ \text{hp} \leq 0 $.
3. Both players play optimally:
- If a win is possible, minimize the number of turns.
- If a win is impossible, maximize the number of turns.
4. Winner is guaranteed to exist.
**Objective**
For each test case $ k $, determine:
- $ \text{status}_k \in \{\text{win}, \text{lose}\} $: whether King of Fire wins.
- $ \text{turn}_k \in \{1, \dots, 12\} $: the turn on which the final hit was made (i.e., the turn when the opponent’s hp dropped to $ \leq 0 $).
Output: `Case #k: status_k turn_k`