402916: GYM100947 D The Three Kings of Asgard
Description
The Three Kingdoms of Asgard are ruled by three very powerful and wealthy kings: Adam, Bob and Carl. Many people think they are very, very evil kings. Every year they exchange some artillery forces to keep the kingdom at peace.
Traditionally king Adam has to give to king Bob as much force as king Bob has. then King Bob gives King Carl as much force as King Carl has. In the end King Carl gives King Adam as much force as King Adam has left.
This year the three kings were surprised to find that all three of them have the same amount of force, but they couldn't recall how this happened so it's your job to find out how much force each one had last year!
InputThe first line contains T the number of test cases your program has to solve.
Each test case contains one number N(1 ≤ N ≤ 109) the amount of force each king has this year.
OutputFor each testcase output three integers: A, B, C. The amount of power Adam, Bob and Carl had last year, respectively. Or say that it is "Impossible".
ExamplesInput2Output
24
10
33 21 18Note
Impossible
In the first testcase:
last year: Adam has 33, Bob has 21 and Carl has 18.
Adam gives Bob as much as Bob has, so Adam in now 12 and Bob is now 42, Carl still have 18.
After that: Bob gives Carl 18, so Adam(12), Bob(24), Carl(36)
Now Carl gives Adam 12: Adam(24), Bob(24), Carl(24). So In the end Each king has 24 force, as the input indicates.