/*
ID: niepeng1
LANG: C++
TASK:kimbits
*/
/*
Stringsobits
Kim Schrijvers
Consider an ordered set S of strings of N (1 <= N <= 31) bits. Bits, of course, are either 0 or 1.
This set of strings is interesting because it is ordered and contains all possible strings of length N that have L (1 <= L <= N) or fewer bits that are `1'.
Your task is to read a number I (1 <= I <= sizeof(S)) from the input and print the Ith element of the ordered set for N bits with no more than L bits that are `1'.
*/
#include<iostream>
using namespace std;
int main()
{
unsigned long int map[33][33];
unsigned long int N,L,I;
int i,j;
freopen("kimbits.in","r",stdin);
freopen("kimbits.out","w",stdout);
scanf("%lu %lu %lu",&N,&L,&I);
for(i=0;i<=N;i++)
{
map[0][i]=1;
map[i][0]=1;
}
for(i=1;i<=N;i++)
for(j=1;j<=N;j++)
{
if(j>i)
map[i][j]=map[i][i];
else
map[i][j]=map[i-1][j]+map[i-1][j-1];
}
for(i=N-1;i>=0;i--)
{
if(map[i][L] < I)
{
printf("1");
I-=map[i][L];
L--;
}
else
printf("0");
}
printf("/n");
return 0;
}