C. Goomba Grouping
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Example
Input
2
8 1
1 10
Output
9 13 16 15 19 20 15 18
-1