#WINGOLD. Win gold medal

Win gold medal

In a game there are a finite number of levels. In order to go to the next level, a player has to clear all the preceding levels. A player can't go further, if he fails to clear the level. Each player has a probability p of clearing the level (which is independent of the other players and the level number). For example, if p =1/2 there is a probability 2-n-1 that a particular game will have exactly n levels cleared. A player will get the gold medal if he clears the maximum number of levels. If the maximum number of levels reached is common between two or more players, then no one wins the gold medal. What is the probability that a gold medal is given to any player?

Input

The first line contains T - the number of test cases. Each test case has p n m - probability of clearing a level for each player, number of players, number of levels in the game.

Output

T lines each with the probability that gold medal is given rounded off to 4 significant digits.

Constraints

1 ≤ T < 10000
1 ≤ n < 1000
1 ≤ m < 100
0 ≤ p ≤ 1.0

Example

Input:
6
0.43 3 2
0.5 3 4
0.2 3 4
0.1 4 5
0.9 3 3
1.0 4 4
Output: 0.4490
0.6244
0.4184
0.3014
0.0275
0.0000