An ATM holds a very large supply of two different denominations of bills. When money is withdrawn, the ATM dispenses exactly the requested amount, as long as it does not exceed the account holder's balance. The customer prefers to carry as few bills as possible, so they want to use the smallest possible total number of bills.
Write a program that dispenses the requested amount exactly while using the minimum total number of bills. You may assume the ATM contains an unlimited supply of each denomination.
The first line contains the number of test cases T. Each test case is given on a single line containing the two denominations a and b held by the ATM and the amount S to withdraw, separated by spaces.
For each test case, print the number of bills of denomination a followed by the number of bills of denomination b, in this order and separated by a space, that dispense exactly S using the minimum total number of bills. If it is impossible to dispense the amount exactly, print "Impossible" (without the quotes).