SP403 FRACTION - Sort fractions

Description

You are given a positive integer N. Let us consider set A of fractions x/y where 0

Input Format

The first line of input contains the number of testcases t (t

Output Format

For each testcase, you should output M lines which are the answers to the M questions.