Odds or evens?

Ana and Bernardo play to “odds or evens”. In each round, first they agree a certain number nn. Then, both of them choose a number at random between 0 and nn, and they write it down in a paper without the other player can see it. Afterwards, Bernardo conjectures if the sum of the two number is an odd or an even number. With the two numbers in the papers they check if he is right and he has won or, otherwise, Ana has won.

For each round, we know nn, the number that has conjectured Bernardo and who has won that round. Implement a program that prints all the combinations of numbers chosen by Ana and Bernardo that are solid with that information.

Input

The input contains the number k<100k<100 of rounds in a line followed by kk lines, each one describing a round. Each round consist of a nn between 1 and 100, the conjecture of Bernardo, and who has won the round, separated by spaces.

Your program must solve an input as the one described in 1 second of time.

Output

For each round, your program must print (starting in 1), followed by all the combinations that are coherent with the information about that round, one per line and in increasing order. It must print a line in white after each round, the last one also.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T10:18:37.860Z

© Jutge.org, 2006–2026.
https://jutge.org