Risky Lottery

Prof. Peter decided to surprise his class by organizing a new lot- tery with a very peculiar system. He starts by announcing a small positive number M. After- wards, each student is going to secretly write an integer from the set {1,...,M} on a slip of paper that is then folded. After every- one has selected a number, they reveal all choices and whoever wrote down the lowest unique number is the winner! For instance, if there are only three students in the class, two of them select number 2 and the other selects number 5, then the student who chose number 5 is the winner. The lottery was a success, but Prof. Peter is now wondering what strategy his students should have used. If everyone follows the same optimal randomized strategy, with which probability should each number be chosen so that they maximize their chances of winning? A strategy is optimal if, when everyone is following it, then no individual student can improve his winning probability by selecting a different strategy. Can you help Prof. Peter? Given N, the number of students in the class, and M, the largest number they can write down, determine the optimal randomized strategy (followed by all students). That is, determine the probability of selecting each number between 1 and M. Input The input file contains several test cases, each of them as described below. There is one line with two integers: N, which is the number of students in the class, and M, which is the largest integer each student can choose. Constraints 3 ≤ N ≤ 7 Number of students in the class 1 ≤ M ≤ N + 1 Maximum number that can be selected Output For each test case, the output consists of M lines. Line k should have the probability of selecting number k. The result will be considered correct as long as the absolute error does not exceed 10−3. Sample Input 33 71 56 Sample Output 0.46410 0.26795 0.26795

2/2 1.00000 0.35785 0.31502 0.19107 0.09512 0.03515 0.00580