import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Solve7 {

    public static void main(String[] args) throws IOException {
        PrintWriter pw = new PrintWriter(System.out);
        new Solve7().solve(pw);
        pw.flush();
        pw.close();
    }

    public void solve(PrintWriter pw) throws IOException {
        FastReader sc = new FastReader();
        final int MAX = (int) 1E+5;
        long[] a = new long[MAX + 1];
        a[1] = 1;
        for (int i = 2; i <= MAX; i++) {
            a[i] = 2L * (i - 1);
        }
        long[] prefix = prefixSum(a);
        int t = sc.nextInt();
        while (t-- > 0) {
            int n = sc.nextInt();
            long l = sc.nextLong(), r = sc.nextLong();
            int num = lowerBound(prefix, 1, n, l);
            long y = prefix[num - 1] + 1, term = l - y + 1;
            long nxt;
            if ((term & 1) == 1) {
                nxt = ((term + 1) >> 1) + 1;
            } else {
                nxt = (term >> 1) + 1;
            }
            if (nxt == num) {
                nxt = 1;
            }
            long now = ((term & 1) == 1) ? num : nxt;
            long cnt = r - l + 1;
            StringBuilder sb = new StringBuilder();
            while (cnt > 0) {
                sb.append(now).append(" ");
                if (now == 1) {
                    ++num;
                    nxt = 2;
                    if (nxt == num) {
                        nxt = 1;
                    }
                    now = num;
                } else {
                    if (now == num) {
                        now = nxt++;
                        if (nxt == num) {
                            nxt = 1;
                        }
                    } else {
                        now = num;
                    }
                }
                --cnt;
            }
            pw.println(sb.toString().trim());
        }
    }

    public int lowerBound(long[] a, int low, int high, long key) {
        if (low > high) {
            return low;
        }
        int mid = (low + high) >> 1;
        if (a[mid] >= key) {
            return lowerBound(a, low, mid - 1, key);
        }
        return lowerBound(a, mid + 1, high, key);
    }

    public long[] prefixSum(long[] a) {
        int n = a.length;
        long[] prefix = new long[n];
        for (int i = 1; i < n; i++) {
            prefix[i] = prefix[i - 1] + a[i];
        }
        return prefix;
    }

    static class FastReader {

        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public FastReader(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
            }
        }

        public String next() {
            if (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            try {
                return br.readLine();
            } catch (Exception e) {
            }
            return null;
        }

        public boolean hasNext() throws IOException {
            if (st != null && st.hasMoreTokens()) {
                return true;
            }
            String s = br.readLine();
            if (s == null || s.isEmpty()) {
                return false;
            }
            st = new StringTokenizer(s);
            return true;
        }
    }
}
