import java.io.BufferedReader; 
import java.io.IOException; 
import java.io.InputStreamReader; 
import java.util.Scanner; 
import java.util.StringTokenizer; 
 import java.util.*; 
public class Main 
{ 
    static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    } 
  
    public static void main(String[] args) 
    { 
        FastReader sc=new FastReader();
       StringBuilder sb1=new StringBuilder();
        int t=sc.nextInt();
        while(t-->0)
        {
            int n=sc.nextInt();
            long l=sc.nextLong();
            long r=sc.nextLong();
            l--;
            r--;
            //StringBuilder sb1=new StringBuilder();
            l-=2;
            r-=2;
            long a[]={1,0,1};
            while(l<=r)
            {
                if(l<0)
                {
                    if(l==-2)
                    sb1.append(1);
                    else if(l==-1)
                    sb1.append(2);
                }
                else if(l%4==0)
                {
                    sb1.append(1);
                }
                else
                {
                    sb1.append(((l/4)+2+a[(int)(l%4)-1]));
                }
                sb1.append(" ");
                l++;
            }
            
            sb1.append("\n");
        }
        System.out.print(sb1.toString());
    
    
     }
     
   
 
}
