#include <bits/stdc++.h>   #pragma GCC target( pclmul )   using ul = std::uint32_t;   using ull = std::uint64_t;   using li = std::int32_t;   using ll = std::int64_t;   using llf = long double;   using uss = std::uint8_t;   const ul tau = 15;   const ul fib[] = {       1,       1,       2,       3,        5,        8,        13,      21,       34,      55,      89,      144,      233,      377,      610,     987,       1597,    2584,    4181,    6765,     10946,    17711,    28657,   46368,       75025,   121393,  196418,  317811,   514229,   832040,   1346269, 2178309,       3524578, 5702887, 9227465, 14930352, 24157817, 39088169, 63245986};   const ul sz = fib[tau];   char f[tau + 1][sz + 1];   ul ord[sz + sz];   class sam_t {    public:     ul las;     class node {      public:       ul ch[2];       ul len = 0;       ul fa = 0;       ul cnt = 0;       node() { std::memset(ch, 0, sizeof(ch)); }     };     std::vector<node> st = std::vector<node>(sz + sz);     void add(ul c) {       ul p = las;       ul np = las = st.size();       st.push_back(node());       st[np].len = st[p].len + 1;       for (; p && !st[p].ch[c]; p = st[p].fa) {         st[p].ch[c] = np;       }       if (!p) {         st[np].fa = 1;       } else {         ul q = st[p].ch[c];         if (st[q].len == st[p].len + 1) {           st[np].fa = q;         } else {           ul nq = st.size();           st.push_back(node());           st[nq] = st[q];           st[nq].cnt = 0;           st[nq].len = st[p].len + 1;           st[q].fa = st[np].fa = nq;           for (; p && st[p].ch[c] == q; p = st[p].fa) {             st[p].ch[c] = nq;           }         }       }     }     void init() {       las = 1;       st.resize(0);       st.resize(2);     }   };   sam_t sams[tau + 1];   ul n, m;   ull k;   const ul maxn = 200;   ull lambda[maxn + 1][4];   const ul maxm = 200;   ul tim = 0;   char ans[maxm + 2];   ul currs[4];   ul nexts0[4];   ul nexts1[4];   ull getnum(ul st[4]) {     ull ret = 0;     for (ul i = 0; i != 4; ++i) {       ret += lambda[n][i] * sams[tau - i].st[st[i]].cnt;     }     return ret;   }   int main() {     f[0][1] =  0 ;     f[1][1] =  1 ;     std::scanf( %u%llu%u , &n, &k, &m);     for (ul x = 2; x <= std::min(n, tau); ++x) {       std::memcpy(f[x] + 1, f[x - 2] + 1, fib[x - 2]);       std::memcpy(f[x] + fib[x - 2] + 1, f[x - 1] + 1, fib[x - 1]);     }     if (n <= tau) {       sams[n].init();       for (ul i = 1; i <= fib[n]; ++i) {         sams[n].add(f[n][i] -  0 );         ++sams[n].st[sams[n].las].cnt;       }       for (ul i = 1; i != sams[n].st.size(); ++i) {         ord[i] = i;       }       std::sort(ord + 1, ord + sams[n].st.size(), [&](ul a, ul b) {         return sams[n].st[a].len < sams[n].st[b].len;       });       for (ul it = sams[n].st.size() - 1; it >= 2; --it) {         ul i = ord[it];         sams[n].st[sams[n].st[i].fa].cnt += sams[n].st[i].cnt;       }       ul curr = 1;       ull cc = sams[n].st[1].cnt;       while (tim < m) {         ul next0 = sams[n].st[curr].ch[0];         ul next1 = sams[n].st[curr].ch[1];         ull cn0 = sams[n].st[next0].cnt;         ull cn1 = sams[n].st[next1].cnt;         if (cc - cn0 - cn1 >= k) {           break;         } else {           k -= cc - cn0 - cn1;         }         if (cn0 >= k) {           ++tim;           ans[tim] =  0 ;           curr = next0;           cc = cn0;         } else {           ++tim;           ans[tim] =  1 ;           curr = next1;           k -= cn0;           cc = cn1;         }       }       std::printf(ans + 1);       std::putchar(  n );     } else {       for (ul x = tau - 3; x <= tau; ++x) {         sams[x].init();         for (ul i = 1; i <= fib[x]; ++i) {           sams[x].add(f[x][i] -  0 );           ++sams[x].st[sams[x].las].cnt;         }         for (ul i = 1; i != sams[x].st.size(); ++i) {           ord[i] = i;         }         std::sort(ord + 1, ord + sams[x].st.size(), [&](ul a, ul b) {           return sams[x].st[a].len < sams[x].st[b].len;         });         for (ul it = sams[x].st.size() - 1; it >= 2; --it) {           ul i = ord[it];           sams[x].st[sams[x].st[i].fa].cnt += sams[x].st[i].cnt;         }         lambda[x][tau - x] = 1;       }       for (ul x = tau + 1; x <= n; ++x) {         for (ul i = 0; i != 4; ++i) {           lambda[x][i] = lambda[x - 1][i] + lambda[x - 2][i] + lambda[x - 2][i] -                          lambda[x - 3][i] - lambda[x - 4][i];         }       }       for (ul i = 0; i != 4; ++i) {         currs[i] = 1;       }       ull cc = getnum(currs);       while (tim < m) {         for (ul i = 0; i != 4; ++i) {           nexts0[i] = sams[tau - i].st[currs[i]].ch[0];           nexts1[i] = sams[tau - i].st[currs[i]].ch[1];         }         ull cn0 = getnum(nexts0);         ull cn1 = getnum(nexts1);         if (cc - cn0 - cn1 >= k) {           break;         } else {           k -= cc - cn0 - cn1;         }         if (cn0 >= k) {           ++tim;           ans[tim] =  0 ;           std::memcpy(currs, nexts0, sizeof(currs));           cc = cn0;         } else {           ++tim;           ans[tim] =  1 ;           std::memcpy(currs, nexts1, sizeof(currs));           k -= cn0;           cc = cn1;         }       }       std::printf(ans + 1);       std::putchar(  n );     }     return 0;   }