#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
template <class T>
T gcd(T a, T b) {
  return a ? gcd(b % a, a) : b;
}
template <class T>
T sqr(T a) {
  return a * a;
}
template <class T>
T sgn(T a) {
  return a > 0 ? 1 : (a < 0 ? -1 : 0);
}
const double pi = acos(-1.0);
int n;
int m;
long long k;
int main() {
  cin >> n >> k >> m;
  vector<vector<int> > pos(n + 2);
  pos[0] = {0};
  pos[1] = {0};
  vector<string> s(n + 2), suf(n + 2);
  suf[0] = s[0] = "0";
  suf[1] = s[1] = "1";
  for (int i = 2; i <= n; i++) {
    s[i] = s[i - 2] + s[i - 1];
    s[i] = s[i].substr(0, m);
    suf[i] = suf[i - 2] + suf[i - 1];
    suf[i] = suf[i].substr(max(((int)(suf[i]).size()) - m, 0));
  }
  int res = 0;
  string ans;
  for (int i = 0; i < m; i++) {
    char ch = '0';
    vector<long long> f(n + 2), g(n + 2), h(n + 2);
    for (int j = 0; j <= n; j++) {
      for (auto p : pos[j]) {
        if (s[j][p] <= ch) f[j]++;
      }
      if (j < 2) g[j] = f[j];
      if (j >= 2) g[j] = f[j - 1];
      if (j >= 2) g[j] += g[j - 1] + g[j - 2];
      g[j] = min(g[j], (long long)1e18);
    }
    for (int j = 0; j < i; j++) {
      string t = suf[n].substr(max(((int)(suf[n]).size()) - j - 1, 0));
      if (t == ans) res++;
    }
    if (k == res && ans == suf[n].substr(max(0, ((int)(suf[n]).size()) -
                                                    ((int)(ans).size()))))
      break;
    if (res + g[n] < k) {
      k -= g[n] + res;
      res = 0;
      ch++;
    } else if (g[n] == 0) {
      ch++;
    }
    ans += ch;
    for (int j = n; j >= 0; j--) {
      vector<int> curp = pos[j];
      pos[j].clear();
      for (auto p : curp) {
        if (s[j][p] != ch) continue;
        if (p + 1 < ((int)(s[j]).size())) {
          pos[j].push_back(p + 1);
        }
      }
      int id = ((int)(suf[j]).size()) - i - 1;
      if (id >= 0 && suf[j].substr(id) == ans) pos[j + 1].push_back(0);
    }
  }
  cout << ans << endl;
  return 0;
}
