Today is the last day of the Tokyo 2020 Summer Olympic Games, with the closing ceremony going to take place tonight at 7PM HKT. In the last 16 days, Hong Kong Team has been continuously making history with by-far the best result of 1 Gold, 2 Silver and 3 Bronze Medals, bringing pride to all Hong Kong citizens. Such credit also belongs to all other Hong Kong athletes, even without medals, since they too have paid numerous effort and fought to their best.
Steve is particularly into this year's Olympics, especially when he saw two LSC Alumni participating in the Games: Choi Chun Yin Ryan (2015) in Fencing and Lam Siu-hang (2015) playing Table Tennis. The three matches played by Lam were tough, yet Lam was able to withstand the pressure and managed to make a comeback in both Round 1 and Round 2, before losing to Japan's world No. 4 Harimoto Tomokazu, still forcing the opponent into ties at 10-10 for three times.
Steve decides to learn more about table tennis rules. The scoring system is as follows:
To mark the end of the Tokyo 2020 Olympics, Steve challenges you with a little twist. Steve will pick any arbitrary match, sums up the points of all games, and tell you how much points each player scores, as well as the winner of the match. You then have to try to construct a possible set of game scores to satisfy all the conditions, or determine if such match result is impossible.
A single line containing three integers $$$P_1, P_2, W$$$ – Player 1's total points, Player 2's total points, and which player wins the match. ($$$0 \le P_1, P_2 \le 1000, 1 \le W \le 2$$$)
Output the match scores in the first line, followed by individual game points in each line.
If there are multiple set of solutions, output any of them. If there are no possible solutions, output -1.
69 63 1
4 3 7 11 11 9 6 11 11 6 11 4 12 14 11 8
61 65 1
4 3 11 7 7 11 4 11 5 11 11 9 12 10 11 6
51 56 2
1 4 9 11 11 13 11 8 10 12 10 12
45 0 1
-1
Samples 1-3 are the actual match results between Lam Siu-hang and (1) Brian Afanador from Puerto Rico, (2) Sathiyan Gnanasekaran from India, and (3) Harimoto Tomokazu from Japan.
| Name |
|---|


