Problem: You are given a complete directed graph K_n with n vertices: each pair of vertices u ≠ v in K_n have both directed edges (u, v) and (v, u); there are no self-loops.

You should find such a cycle in K_n that visits every directed edge exactly once (allowing for revisiting vertices).

We can write such cycle as a list of n(n - 1) + 1 vertices v_1, v_2, v_3, ..., v_{n(n - 1) - 1}, v_{n(n - 1)}, v_{n(n - 1) + 1} = v_1 — a visiting order, where each (v_i, v_{i + 1}) occurs exactly once.

Find the lexicographically smallest such cycle. It's not hard to prove that the cycle always exists.

Since the answer can be too large print its [l, r] segment, in other words, v_l, v_{l + 1}, ..., v_r.

Input

The first line contains the single integer T (1 ≤ T ≤ 100) — the number of test cases.

Next T lines contain test cases — one per line. The first and only line of each test case contains three integers n, l and r (2 ≤ n ≤ 10^5, 1 ≤ l ≤ r ≤ n(n - 1) + 1, r - l + 1 ≤ 10^5) — the number of vertices in K_n, and segment of the cycle to print.

It's guaranteed that the total sum of n doesn't exceed 10^5 and the total sum of r - l + 1 doesn't exceed 10^5.

Output

For each test case print the segment v_l, v_{l + 1}, ..., v_r of the lexicographically smallest cycle that visits every edge exactly once.

Example

Input


3
2 1 3
3 3 6
99995 9998900031 9998900031


Output


1 2 1 
1 3 2 3 
1 

Note

In the second test case, the lexicographically minimum cycle looks like: 1, 2, 1, 3, 2, 3, 1.

In the third test case, it's quite obvious that the cycle should start and end in vertex 1.

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;

public class D
{
    PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer tok;
    HashMap<List<Long>, Long> map = new HashMap<>();

    public void go() throws IOException
    {
        StringTokenizer tok = new StringTokenizer(in.readLine());
        int zzz = Integer.parseInt(tok.nextToken());
        for (int zz = 0; zz < zzz; zz++)
        {
            ntok();
            long n = lpar();
            long l = lpar()-1;
            long r = lpar()-1;
            for (long i = l; i <= r; i++) {
                out.print(getIndex2(n, i));
                out.print(' ');
            }
            out.println();
            // for (long i = 0; i <= n*(n-1); i++) {
            //     if (getIndex(n, i) != getIndex2(n, i)) {
            //         out.println("WRONG " + i);
            //         break;
            //     }
            // }
            // for (long i = 0; i <= n*(n-1); i++) {
            //     out.print(getIndex(n, i));
            //     out.print(' ');
            // }
            // out.println();
            // for (long i = 0; i <= n*(n-1); i++) {
            //     out.print(getIndex2(n, i));
            //     out.print(' ');
            // }
            // out.println();
            // printOrder((int)n);
        }

        out.flush();
        in.close();
    }

    public void printOrder(int n) {
        boolean[][] mat = new boolean[n][n];
        for (boolean[] arr : mat) {
            Arrays.fill(arr, true);
        }
        for (int i = 0; i < n; i++) {
            mat[i][i] = false;
        }
        int curr = 0;
        out.print('1');
        for (int i = 0; i < n*(n-1); i++) {
            for (int e = 0; e < n; e++) {
                if (mat[curr][e]) {
                    mat[curr][e] = false;
                    curr = e;
                    break;
                }
            }
            out.print(' ');
            out.print(curr+1);
        }
        out.println();
    }

    public long getIndex2(long n, long i) {
        List<Long> pair = new ArrayList<>();
        pair.add(n);
        pair.add(i);
        if (map.containsKey(pair)) {
            return map.get(pair);
        }
        long ans;
        if (i < (n-1)*2) {
            ans = i % 2 == 0 ? 1 : i/2+2;
        } else if (i == n*(n-1)-1) {
            ans = n;
        } else if (i == n*(n-1)) {
            ans = 1;
        } else {
            long l = 1;
            long r = n-1;
            while (r > l+1) {
                long mid = (r+l)/2;
                long minus = 2 * ((n*(n-1)/2) - ((n-mid)*(n-mid-1)/2));
                if (minus > i) {
                    r = mid - 1;
                } else {
                    l = mid;
                }
            }
            long minus = 2 * ((n*(n-1)/2) - ((n-l)*(n-l-1)/2));
            ans = getIndex2(n-l, i - minus) + l;
        }
        map.put(pair, ans);
        return ans;
    }

    public long getIndex(long n, long i) {
        List<Long> pair = new ArrayList<>();
        pair.add(n);
        pair.add(i);
        if (map.containsKey(pair)) {
            return map.get(pair);
        }
        long ans;
        if (i < (n-1)*2) {
            ans = i % 2 == 0 ? 1 : i/2+2;
        } else if (i == n*(n-1)-1) {
            ans = n;
        } else if (i == n*(n-1)) {
            ans = 1;
        } else {
            // long l = 1;
            // long r = n;
            // while (r > l+1) {
            //     long mid = (r+l)/2;
            //     long minus = 2 * ((n*(n-1)/2) - ((n-mid)*(n-mid-1)/2));
            //     if (minus > i) {
            //         r = mid - 1;
            //     } else {
            //         l = mid;
            //     }
            // }
            // long minus = 2 * ((n*(n-1)/2) - ((n-l)*(n-l-1)/2));
            // ans = getIndex(n-1, i - minus) + l;
            ans = getIndex(n-1, i - (n-1)*2) + 1;
        }
        map.put(pair, ans);
        return ans;
    }

    public void ntok() throws IOException
    {
        tok = new StringTokenizer(in.readLine());
    }

    public int ipar()
    {
        return Integer.parseInt(tok.nextToken());
    }

    public int[] iapar(int n)
    {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++)
        {
            arr[i] = ipar();
        }
        return arr;
    }

    public long lpar()
    {
        return Long.parseLong(tok.nextToken());
    }

    public long[] lapar(int n)
    {
        long[] arr = new long[n];
        for (int i = 0; i < n; i++)
        {
            arr[i] = lpar();
        }
        return arr;
    }

    public double dpar()
    {
        return Double.parseDouble(tok.nextToken());
    }

    public String spar()
    {
        return tok.nextToken();
    }

    public static void main(String[] args) throws IOException
    {
        new D().go();
    }
}