Our favourite character, Joey, is facing a problem in remembering days of the week. He needs to practice learning them. He asks for your help to remember them.
He gives you a month with arbitrary number of days, N, and the day with which it starts, K. You need to tell him the number of Mondays, Tuesdays, ..., Sundays in the month.
The value of K will be 1 for Monday, 2 for Tuesday and so on.
First line of input contains a single integer T denoting the number of test cases.
The first line of each test case contains 2 space-separated integers N and K.
For each test case, print seven space-separated integers denoting the number of Mondays, Tuesdays, ..., Sundays in a new line.
1 <= T <= 200
1 <= N <= 10^12
1 <= K <= 7