Prince of Persia walks into a casino holding the dagger of time...
Initially he has a single gold coin. He goes to a roulette and starts betting. On each bet he chooses between red and black and must bet a positive integer amount of coins on it. If he wins, he gets double his bet back. Otherwise he loses the bet. Roulette outcomes are distributed uniformly (i.e. both red and black have probability of $$$\frac{1}{2}$$$) and independently from each other.
After the roulette outcome is known, Prince may rollback to the point in time immediately before he made the bet and redo it in any way he wants (possibly betting on a different color or betting a different amount of coins). The roulette outcome will not change after doing rollback. Prince wants to make a total of $$$n$$$ bets and he may use the rollback at most $$$m$$$ times throughout them. Rolling back and redoing a bet does not count as making a new bet.
Prince wants to make sure that before each of $$$n$$$ bets he has at least $$$1$$$ coin in his possession to make a valid bet, while otherwise maximizing the expected amount of coins he will leave with. Given $$$n$$$ and $$$m$$$, determine the expected amount of coins Prince would leave with. If it's not possible to guarantee that Prince makes a sequence of $$$n$$$ valid bets, print bankrupt instead.
Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 10^5$$$). Description of the test cases follows.
The first line of each test case contains two integers $$$n$$$ and $$$m$$$ ($$$1 \le n, m \le 10^5$$$) — the number of betting rounds Prince will go through and the number of times he is allowed to use the rollback ability of the dagger of time.
The sum of $$$m$$$ over all test cases does not exceed $$$10^6$$$.
For each test case, if it is not possible to guarantee that Prince makes a sequence of $$$N$$$ valid bets, print bankrupt, otherwise print the expected amount of coins Prince is going to win modulo $$$10^9+9$$$.
Formally, let $$$M = 10^9+9$$$. It can be shown that the answer can be expressed as an irreducible fraction $$$\frac{p}{q}$$$, where $$$p$$$ and $$$q$$$ are integers and $$$q \not \equiv 0 \pmod{M}$$$. Output the integer equal to $$$p \cdot q^{-1} \bmod M$$$. In other words, output such an integer $$$x$$$ that $$$0 \le x \lt M$$$ and $$$x \cdot q \equiv p \pmod{M}$$$.
42 14 13 257639 34614
3 bankrupt 7 869788168
Consider the first test case. According to the rules of the game, he must bet exactly one coin.
For the second test case, suppose that Prince of Persia loses the first bet he makes. In that case, he has run out of money, but still has 3 more bets to make. Thus, he is forced to use his only rollback and bet his only coin on the opposite color. Now he has 2 coins. For the remaining three bets, suppose he loses every time. Even if he only bets one coin every time, he will run out of money: he has 2 coins before the second bet, 1 coin before the third bet and no money to make the fourth bet.
| Name |
|---|


