#include<bits/stdc++.h>
using namespace std;
const int N=110;
string BFS[N];
void make(int n){
BFS[0]="0";
BFS[1]="1";
for(int i=2;i<=n;i++){
BFS[i]=BFS[i-1]+BFS[i-2];
}
}
void print(int x,int y,string l){
for(int i=x;i<=y;i++){
cout<<l[i];
}
cout<<endl;
}
int t;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
cin>>t;
make(110);
while(t--){
int n,i,j;
cin>>n>>i>>j;
string s=BFS[n];
print(i,j,s);
}
return 0;
}