#include <bits/stdc++.h>
using namespace std;
inline char gc() {
  static char buf[100000], *p1 = buf, *p2 = buf;
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
inline long long read() {
  long long x = 0;
  char ch = getchar();
  bool positive = 1;
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') positive = 0;
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
  return positive ? x : -x;
}
inline void write(long long a) {
  if (a < 0) {
    a = -a;
    putchar('-');
  }
  if (a >= 10) write(a / 10);
  putchar('0' + a % 10);
}
inline void writeln(long long a) {
  write(a);
  puts("");
}
inline void wri(long long a) {
  write(a);
  putchar(' ');
}
const int N = 205;
const long long inf = 4e18;
int n, m;
long long f[N][N], k, g[N][N];
string F[N];
long long sol(string x) {
  int len = x.length();
  x = " " + x;
  int p = 0;
  memset(f, 0, sizeof(f));
  for (int i = 1; i <= len; i++) x[i] -= '0';
  f[x[1]][0] = 1;
  for (int i = 1; i <= len; i++) {
    if (i > 1) p = f[x[i]][p];
    if (i < len && x[i + 1] == 0)
      f[0][i] = i + 1;
    else
      f[0][i] = f[0][p];
    if (i < len && x[i + 1] == 1)
      f[1][i] = i + 1;
    else
      f[1][i] = f[1][p];
  }
  for (int i = 0; i <= len; i++) {
    g[0][i] = f[0][i] == len;
    g[1][i] = f[1][i] == len;
  }
  for (int i = 2; i <= n; i++) {
    for (int j = 0; j <= len; j++) {
      f[i][j] = f[i - 1][f[i - 2][j]];
      g[i][j] = min(inf, g[i - 2][j] + g[i - 1][f[i - 2][j]]);
    }
  }
  return g[n][0];
}
int main() {
  n = read();
  k = read();
  m = read();
  string s = "";
  F[0] = "0";
  F[1] = "1";
  for (int i = 2; i <= n; i++) {
    F[i] = F[i - 2] + F[i - 1];
    if (F[i].length() > m) F[i] = F[i].substr(F[i].length() - m, m);
  }
  m = min(m, (int)F[n].length());
  for (int i = 1; i <= m; i++) {
    if (s.length() &&
        F[n].substr(F[n].length() - s.length(), s.length()) == s) {
      if (--k == 0) {
        cout << s << endl;
        return 0;
      }
    }
    s += "0";
    long long t = sol(s);
    if (t < k) {
      k -= t;
      s.pop_back();
      s += "1";
    }
  }
  cout << s << endl;
}
