#include <bits/stdc++.h>
using string = std::string;
int n, m;
long long k;
string dp_head[201], dp_tail[201];
std::map<string, long long> dp_occurence_cnt[201];
void tail_fix_to_m(string &s) {
  if ((int)(s).size() > m) {
    s = s.substr((int)(s).size() - m);
  }
}
void head_fix_to_m(string &s) {
  if ((int)(s).size() > m) {
    s = s.substr(0, m);
  }
}
int main() {
  scanf("%d%lld%d", &n, &k, &m);
  dp_head[0] = dp_tail[0] = "0";
  dp_head[1] = dp_tail[1] = "1";
  dp_occurence_cnt[0]["0"] = 1;
  dp_occurence_cnt[1]["1"] = 1;
  for (int i = 2; i <= n; i++) {
    if ((int)(dp_tail[i - 1]).size() < m) {
      dp_tail[i] = dp_tail[i - 2] + dp_tail[i - 1];
      tail_fix_to_m(dp_tail[i]);
    } else
      dp_tail[i] = dp_tail[i - 1];
    if ((int)(dp_head[i - 2]).size() < m) {
      dp_head[i] = dp_head[i - 2] + dp_head[i - 1];
      head_fix_to_m(dp_head[i]);
    } else
      dp_head[i] = dp_head[i - 2];
    dp_occurence_cnt[i] = dp_occurence_cnt[i - 1];
    for (auto AA : dp_occurence_cnt[i - 2]) {
      dp_occurence_cnt[i][AA.first] += AA.second;
    }
    for (int j = 1; j < m && j <= (int)(dp_tail[i - 2]).size(); j++) {
      string tmp_tail = dp_tail[i - 2].substr((int)(dp_tail[i - 2]).size() - j);
      if (dp_occurence_cnt[i].count(tmp_tail) &&
          dp_occurence_cnt[i][tmp_tail] > 0) {
        dp_occurence_cnt[i][tmp_tail]--;
        tmp_tail += dp_head[i - 1];
        head_fix_to_m(tmp_tail);
        dp_occurence_cnt[i][tmp_tail]++;
      }
    }
    long long now = 0;
    for (auto it = dp_occurence_cnt[i].begin(); it != dp_occurence_cnt[i].end();
         it++) {
      if (now >= k) {
        dp_occurence_cnt[i].erase(it, dp_occurence_cnt[i].end());
        break;
      }
      if (now + it->second > k) {
        it->second = k - now;
      }
      now += it->second;
    }
  }
  for (auto AA : dp_occurence_cnt[n]) {
    if (k <= AA.second) {
      printf("%s\n", AA.first.c_str());
      return 0;
    }
    k -= AA.second;
  }
  return 0;
}
