#include <bits/stdc++.h>
using namespace std;
string fib[15];
char result_string[200];
int best_prefix[200];
string mids[2];
long long appears(string &s, int result_length, long long from, long long to) {
  long long current = -1;
  long long appearances = 0;
  for (int i = from; i < to; i++) {
    while (true) {
      if (current + 1 < result_length) {
        if (result_string[current + 1] == s[i]) {
          current++;
          break;
        }
      }
      if (current == -1) {
        break;
      } else {
        current = best_prefix[current];
      }
    }
    if (current == result_length - 1) {
      appearances++;
    }
  }
  return appearances;
}
void init_new_char(int idx) {
  int current;
  if (idx == 0) {
    best_prefix[idx] = -1;
  } else {
    current = best_prefix[idx - 1];
    while (true) {
      if (result_string[idx] == result_string[current + 1]) {
        best_prefix[idx] = current + 1;
        break;
      } else if (current != -1) {
        current = best_prefix[current];
      } else {
        best_prefix[idx] = -1;
        break;
      }
    }
  }
}
long long appear_in_n_in_series(int result_length, int n, long long k) {
  long long mid_appears[2];
  long long current = 0, prev = -0, pre_prev = 0;
  for (int i = 0; i < 2; i++) {
    mid_appears[i] =
        appears(mids[i], result_length, fib[13].length() - result_length + 1,
                fib[13].length() + result_length - 1);
  }
  for (int i = 0; i <= n; i++) {
    pre_prev = prev;
    prev = current;
    if (i < 15) {
      current = appears(fib[i], result_length, 0, fib[i].length());
    } else {
      current = prev + pre_prev + mid_appears[i % 2];
    }
    if (current > k) {
      return current;
    }
  }
  return current;
}
int main() {
  iostream::sync_with_stdio(false);
  fib[0] = "0";
  fib[1] = "1";
  for (int i = 2; i < 15; i++) {
    fib[i] = fib[i - 2] + fib[i - 1];
  }
  mids[0] = fib[13] + fib[13];
  mids[1] = fib[13] + fib[12];
  long long n, k, m;
  long long current;
  bool good_ending;
  int end_num;
  cin >> n >> k >> m;
  k++;
  if (n <= 14) {
    if (m > fib[n].length()) {
      m = fib[n].length();
    }
  }
  for (int i = 0; i < m; i++) {
    good_ending = true;
    if (n <= 14) {
      end_num = n;
    } else {
      end_num = 14;
    }
    for (int j = 0; j < i; j++) {
      if (fib[end_num][fib[end_num].length() - i + j] != result_string[j]) {
        good_ending = false;
        break;
      }
    }
    if (good_ending) {
      k--;
      if (k == 0) {
        break;
      }
    }
    result_string[i] = '0';
    init_new_char(i);
    current = appear_in_n_in_series(i + 1, n, k);
    if (current < k) {
      result_string[i] = '1';
      k -= current;
      init_new_char(i);
    }
    cout << result_string[i];
  }
  cout << endl;
  return 0;
}
