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:
//package com.prituladima.codeforce.contest1334;

import java.io.*;
import java.util.*;
import java.util.function.Predicate;

import static java.util.Arrays.stream;
import static java.util.stream.IntStream.range;

/**
 * Don't confuse variables in inner cycles. Don't call variable like (i j k g). Delegate methods.
 * -Xmx64m maximum heap size allocation
 * 90% errors is copy-paste, wrong indexes and TOO MUCH variables
 */
public class SolutionD {

    private static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    private static final boolean MULTI_TEST = true;

    private static final int BITS = 31;
    private static final int MODULO = (int) 1e9 + 7;
    private static final int INF = (int) 1e7 + 7;

    private static final Random rand = new Random(1278367);

    private static final String yes = "YES", no = "NO";

    private static final int MAXN = 2 * (int) 10e5 + 10;

    private boolean[] used = new boolean[MAXN];

    private void solveAll() {
        int t = MULTI_TEST ? nextInt() : 1;
        while (t-- > 0) {
            solve();
        }
    }

    private long pathLen(long n) {
        return n * (n - 1) + 1;
    }

    private long sum(long n, long k) {
        return n * k - k * (k + 1) / 2;
    }


    private void solve() {
        long n = nextInt();
        long L = nextLong();
        long R = nextLong();

        boolean tillEnd = false;
        if (R == pathLen(n)) {
            R--;
            tillEnd = true;
        }

        long curPointer = 1;
        long lev = 1;
        for (; curPointer + 2*(n - lev) < L; lev++) {
            curPointer += 2*(n - lev);
        }

//        lev = upperBound();


//        debug("curPointer = " + curPointer);
//        debug("lev = " + lev);


        boolean trigger = true;
        outer:
        for (; lev < n; lev++) {
            for (long lev2 = lev + 1; lev2 <= n; curPointer++) {
//                if (curFrom == L && curFrom + 1 == R) {
//                    print(lev);
//                    print(' ');
//                    print(lev2);
//                    print(' ');
//
//                }
                if (curPointer < L) {
                    if (trigger) {
//                        print(lev);
//                        printSpace();
                    } else {
//                        print(lev2);
//                        printSpace();
                        lev2++;
                    }

                    trigger = !trigger;
                } else if (R < curPointer) {
                    break outer;
                } else {
                    if (trigger) {
                        print(lev);
                        printSpace();
                    } else {
                        print(lev2);
                        printSpace();
                        lev2++;
                    }

                    trigger = !trigger;
                }

            }
        }
        if (tillEnd) {
            print(1);
        }
        println();


//        }
//
        //1.
        /**
         * n vertexes
         * n - 1
         * n - 2
         * n - 3
         *
         * r - l + 1;
         * 1 2
         * 1 3
         * 2 3
         * 1
         *
         */

//        long k;
//        if ((L + 1) / 2 <= n - 1) {
//            k = 0;
//        } else {
//        long lowK = 0, highK = n;
//        while (highK - lowK > 1) {
//            long mid = lowK + (highK - lowK) / 2;
//            long sum = n * mid - mid * (mid + 1) / 2;
//            if (sum < (L + 1) / 2) {//row number
//                lowK = mid;
//            } else {
//                highK = mid;
//            }
//        }
//        k = lowK;
//        }

//        debug("k = " + k);

//        long P = n * k - k * (k + 1) / 2 + 1;

//        long diff = (L + 1) / 2 - P;

//        if (L % 2 == 0) {
//            print((k + 2 + diff) + " ");
//            L++;
//            diff++;
//        }


//        boolean oneMore = false;
//        boolean last = false;
//        if (R == n * (n - 1) + 1) {
//            last = true;
//            R--;
//        } else if (R % 2 == 1) {
//            oneMore = true;
//            R--;
//        }


//        while (L / 2 <= R / 2) {
//            print((k + 1) + " " + (k + 2 + diff) + " ");
//            if ((k + 2 + diff) == n) {
//                k++;
//                diff = 0;
//            }
//            L++;
//            L++;
//            diff++;
//        }
//
//
//        if (last) {
//            println(1);
//        } else if (oneMore) {
//            println((k + 1));
//        } else {
//            println();
//        }

    }


    private boolean inRange(int val, int fromInclusive, int toExclusive) {
        return fromInclusive <= val && val < toExclusive;
    }

    private int nextRandInt(int minInclusive, int maxExclusive) {
        return rand.nextInt(maxExclusive - minInclusive) + minInclusive;
    }


    /**
     * Graph traverses
     */
    private void dfs(int from, boolean[] used, Graph graph) {
        used[from] = true;
        for (int to : graph.get(from)) {
            if (!used[to]) {
                dfs(to, used, graph);
            }
        }
    }

    private void dfsTree(int from, int parent, Tree tree) {
        for (int to : tree.get(from)) {
            if (parent != to) {
                dfsTree(to, from, tree);
            }
        }
    }

    /**
     * Binary searches.
     */
    private long upperBound(long inclusiveLeft, long exclusiveRight, Predicate<Long> predicate) {
        while (exclusiveRight - inclusiveLeft > 1) {
            long middle = inclusiveLeft + (exclusiveRight - inclusiveLeft) / 2;
            if (predicate.test(middle)) {
                inclusiveLeft = middle;
            } else {
                exclusiveRight = middle;
            }
        }
        return inclusiveLeft;
    }

    private int lowerBound(int exclusiveLeft, int inclusiveRight, Predicate<Integer> predicate) {
        while (inclusiveRight - exclusiveLeft > 1) {
            int middle = exclusiveLeft + (inclusiveRight - exclusiveLeft) / 2;
            if (predicate.test(middle)) {
                inclusiveRight = middle;
            } else {
                exclusiveLeft = middle;
            }
        }
        return inclusiveRight;
    }

    private int minAns(int lev) {

        char[] tabs = new char[lev];
        Arrays.fill(tabs, '\t');
        debug(new StringBuilder().append(tabs).append(" ").append(lev));

        return 0;
    }

    public static void main(String[] args) {
        new SolutionD().run();
    }

    private BufferedReader reader;
    private PrintWriter writer;
    private StringTokenizer tokenizer;

    private void run() {
        try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
             PrintWriter writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)))) {
            this.writer = writer;
            this.reader = reader;
            solveAll();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    /**
     * Base types: Strings, int, long, double
     */
    private String nextToken() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    private int nextInt() {
        return Integer.parseInt(nextToken());
    }

    private long nextLong() {
        return Long.parseLong(nextToken());
    }

    private double nextDouble() {
        return Double.parseDouble(nextToken());
    }


    /**
     * Primitives 1D arrays: char, int, long, double
     */
    private char[] nextCharArray() {
        return nextToken().toCharArray();
    }

    private int[] nextIntArray(int size) {
        return stream(new int[size]).map(c -> nextInt()).toArray();
    }

    private long[] nextLongArray(int size) {
        return stream(new long[size]).map(c -> nextLong()).toArray();
    }

    private double[] nextDoubleArray(int size) {
        return stream(new double[size]).map(c -> nextDouble()).toArray();
    }

    private String[] nextStringArray(int size) {
        return range(0, size).mapToObj(i -> nextToken()).toArray(String[]::new);
    }


    /**
     * Primitives 2D arrays: char, int, long, double
     */
    private char[][] nextCharMatrix(int n) {
        return range(0, n).mapToObj(i -> nextToken().toCharArray()).toArray(char[][]::new);
    }

    private int[][] nextIntMatrix(final int n, final int m) {
        return range(0, n).mapToObj(i -> nextIntArray(m)).toArray(int[][]::new);
    }

    private long[][] nextLongMatrix(final int n, final int m) {
        return range(0, n).mapToObj(i -> nextLongArray(m)).toArray(long[][]::new);
    }

    private double[][] nextDoubleMatrix(final int n, final int m) {
        return range(0, n).mapToObj(i -> nextDoubleArray(m)).toArray(double[][]::new);
    }

    /**
     * Graphs
     */
    private static class Graph extends HashMap<Integer, Collection<Integer>> {

    }

    private static class Tree extends Graph {

    }

    private Graph nextGraph(int amountOfVertexes, int amountOfEdges, boolean isDirected) {
        Graph graph = new Graph();
        for (int i = 1; i <= amountOfVertexes; i++) {
            graph.put(i, new HashSet<>());
        }
        for (int i = 1; i <= amountOfEdges; i++) {
            int from = nextInt();
            int to = nextInt();
            graph.get(from).add(to);
            if (!isDirected) {
                graph.get(to).add(from);
            }
        }
        return graph;
    }

    private Tree nextTree(int amountOfVertexes, boolean isDirected) {
        Tree tree = new Tree();
        for (int i = 1; i <= amountOfVertexes; i++) {
            tree.put(i, new HashSet<>());
        }
        for (int i = 1; i <= amountOfVertexes - 1; i++) {
            int from = nextInt();
            int to = nextInt();
            tree.get(from).add(to);
            if (!isDirected) {
                tree.get(to).add(from);
            }
        }
        return tree;
    }

    /**
     * Output
     */
    private void printf(String format, Object... args) {
        writer.printf(format, args);
    }

    private void print(Object o) {
        writer.print(o);
    }

    private void printSpace() {
        writer.print(' ');
    }

    private void println() {
        writer.println();
    }

    private void println(Object o) {
        writer.println(o);
    }

    private void flush() {
        writer.flush();
    }

    /**
     * Utils
     */

    private boolean isValidIndex(int ind, int n) {
        return 0 <= ind && ind < n;
    }

    private void printSeparator() {
        if (ONLINE_JUDGE) return;
        println("--------------Answer-----------------");
    }

    private void debug(Object o) {
        if (ONLINE_JUDGE) return;
        println(o);
    }

    private void debug(int[] array) {
        if (ONLINE_JUDGE) return;
        for (int i = 0; i < array.length; i++) {
            print(array[i]);
            print(' ');
        }
        println();
    }

    private void debug(int[][] matrix) {
        if (ONLINE_JUDGE) return;
        for (int i = 0; i < matrix.length; i++) {
            for (int j = 0; j < matrix[i].length; j++) {
                print(matrix[i][j]);
                print(' ');
            }
            println();
        }
    }


    private void debug(char[][] matrix) {
        if (ONLINE_JUDGE) return;
        for (int i = 0; i < matrix.length; i++) {
            for (int j = 0; j < matrix[i].length; j++) {
                print(matrix[i][j]);
                print(' ');
            }
            println();
        }
    }

    public static double maxn(double req, double... opt) {
        double max = req;
        for (double value : opt) max = Math.max(max, value);
        return max;
    }

    public static double minn(double req, double... opt) {
        double min = req;
        for (double value : opt) min = Math.min(min, value);
        return min;
    }

    public static double sumn(double... a) {
        return stream(a).sum();
    }

    public static int maxn(int req, int... opt) {
        int max = req;
        for (int value : opt) max = Math.max(max, value);
        return max;
    }

    public static int minn(int req, int... opt) {
        int min = req;
        for (int value : opt) min = Math.min(min, value);
        return min;
    }

    public static int sumn(int... a) {
        return stream(a).sum();
    }

    public static long maxn(long req, long... opt) {
        long max = req;
        for (long value : opt) max = Math.max(max, value);
        return max;
    }

    public static long minn(long req, long... opt) {
        long min = req;
        for (long value : opt) min = Math.min(min, value);
        return min;
    }

    public static long sumn(long... a) {
        return stream(a).sum();
    }

    public static void sort(long[] array) {
        shuffle(array);
        Arrays.sort(array);
    }

    public static void shuffle(long[] array) {
        Random random = new Random();
        for (int i = 0, j; i < array.length; i++) {
            j = i + random.nextInt(array.length - i);
            long buf = array[j];
            array[j] = array[i];
            array[i] = buf;
        }
    }

    public static void sort(int[] array) {
        shuffle(array);
        Arrays.sort(array);
    }

    public static void shuffle(int[] array) {
        Random random = new Random();
        for (int i = 0, j; i < array.length; i++) {
            j = i + random.nextInt(array.length - i);
            int buf = array[j];
            array[j] = array[i];
            array[i] = buf;
        }
    }

    public static Map<Double, Integer> multiSet(double[] arr) {
        Map<Double, Integer> multiSet = new HashMap<>();
        for (int i = 0; i < arr.length; i++) multiSet.put(arr[i], multiSet.getOrDefault(arr[i], 0) + 1);
        return multiSet;
    }

    public static Map<Integer, Integer> multiSet(int[] arr) {
        Map<Integer, Integer> multiSet = new HashMap<>();
        for (int i = 0; i < arr.length; i++) multiSet.put(arr[i], multiSet.getOrDefault(arr[i], 0) + 1);
        return multiSet;
    }

    public static Map<Long, Integer> multiSet(long[] arr) {
        Map<Long, Integer> multiSet = new HashMap<>();
        for (int i = 0; i < arr.length; i++) multiSet.put(arr[i], multiSet.getOrDefault(arr[i], 0) + 1);
        return multiSet;
    }

    public static int[] calculatePrefixSum(int[] a) {
        int[] pref = new int[a.length];
        pref[0] = a[0];
        for (int i = 1; i < a.length; i++) pref[i] = pref[i - 1] + a[i];
        return pref;
    }

    public static int[] calculateSuffixSum(int[] a) {
        int[] suff = new int[a.length];
        suff[a.length - 1] = a[a.length - 1];
        for (int i = a.length - 2; i >= 0; i--) suff[i] = suff[i + 1] + a[i];
        return suff;
    }

    public static long[] calculatePrefixSum(long[] a) {
        long[] pref = new long[a.length];
        pref[0] = a[0];
        for (int i = 1; i < a.length; i++) pref[i] = pref[i - 1] + a[i];
        return pref;
    }

    public static long[] calculateSuffixSum(long[] a) {
        long[] suff = new long[a.length];
        suff[a.length - 1] = a[a.length - 1];
        for (int i = a.length - 2; i >= 0; i--) suff[i] = suff[i + 1] + a[i];
        return suff;
    }

}