TA Arithat is feeling upset because all of his k cups of Indomie were eaten during the test. To determine who is responsible, he has summoned n students to the classroom. As each student enters, they must follow a specific rule for knocking on the table:
After all students have knocked, the last student to arrive may knock on the door again using the same rule, and then everyone in the room will take turns knocking in reverse order of their initial entry.
For example, if there are 5 students named Alice, Bob, Charlie, David, and Eve, and k is 2, the knocking sequence would look like this:
(Alice enters, 1 student in total)
Alice: 1
(Bob enters, 2 students in total)
Alice: 1, Bob: 3, Alice: 1
(Charlie enters, 3 students in total)
Alice: 1, Bob: 2, Charlie: 4, Bob: 2, Alice: 1
(David enters, 4 students in total)
Alice: 1, Bob: 3, Charlie: 5, David: 7, Charlie: 5, Bob: 3, Alice: 1
(Eve enters, 5 students in total)
Alice: 1, Bob: 2, Charlie: 4, David: 8, Eve: 16, David: 8, Charlie: 4, Bob: 2, Alice: 1
As the first student, your task is to keep a record of how many times each student knocked on the table. You do not need to include their names in the record.
All test case contains two positive integer n and k. (1 ≤ n ≤ 32, 1 ≤ k ≤ 10)
The record of how many times every person has knocked in each round. The number of times a student knocks on the table is to be separated by a space. At the end of each round, you must output an endline character '\n'.
It is guaranteed that all numbers are less than 263 - 1