#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
string suf[205], prf[205], fib[205];
long long mlen[205];
long long cnt[205];
int n, m;
long long k;
int pi[205];
string ans;
inline bool issufffix(string mstr, string a) {
  if (a.length() > mstr.length()) return false;
  return (mstr.substr(mstr.length() - a.length(), mstr.length()) == a);
}
int KMP(string a, string b, string mkey) {
  if (a.length() > mkey.length()) {
    a = a.substr(a.length() - mkey.length(), a.length());
  }
  if (b.length() > mkey.length()) {
    b = b.substr(0, mkey.length());
  }
  string c = a + b;
  pi[0] = -1;
  int ret = 0;
  int j = -1;
  for (int i = 1; i < mkey.length(); i++) {
    while (j >= 0 && mkey[j + 1] != mkey[i]) {
      j = pi[j];
    }
    if (mkey[j + 1] == mkey[i]) j++;
    pi[i] = j;
  }
  j = -1;
  for (int i = 0; i < c.length(); i++) {
    while (j >= 0 && c[i] != mkey[j + 1]) {
      j = pi[j];
    }
    if (c[i] == mkey[j + 1]) j++;
    if (j + 1 == mkey.length()) {
      ret++;
      j = -1;
    }
  }
  if (mkey.compare(a) == 0) ret--;
  if (mkey.compare(b) == 0) ret--;
  return ret;
}
inline void CalcFib() {
  fib[0] = "0";
  fib[1] = "1";
  for (int i = 2; i <= 5; i++) {
    fib[i] = fib[i - 2] + fib[i - 1];
  }
  cout << fib[5] << endl;
}
int main() {
  prf[0] = "0";
  suf[0] = "0";
  prf[1] = "1";
  suf[1] = "1";
  mlen[0] = 1;
  mlen[1] = 1;
  scanf("%d%lld%d", &n, &k, &m);
  for (int i = 2; i <= n; i++) {
    mlen[i] = mlen[i - 2] + mlen[i - 1];
    if (mlen[i] <= m) {
      prf[i] = prf[i - 2] + prf[i - 1];
      suf[i] = suf[i - 2] + suf[i - 1];
    } else if (mlen[i - 1] < m) {
      int tx = m - mlen[i - 1];
      suf[i] = suf[i - 2].substr(mlen[i - 2] - tx, mlen[i - 2]) + suf[i - 1];
      tx = m - mlen[i - 2];
      prf[i] = prf[i - 2] + prf[i - 1].substr(0, tx);
    } else if (mlen[i - 2] < m) {
      suf[i] = suf[i - 1];
      int tx = m - mlen[i - 2];
      prf[i] = prf[i - 2] + prf[i - 1].substr(0, tx);
    } else {
      suf[i] = suf[i - 1];
      prf[i] = prf[i - 2];
    }
    if (mlen[i] > m) {
      mlen[i] = m + 1;
    }
  }
  for (int i = 0; i < m; i++) {
    ans.push_back('0');
    memset(cnt, 0, sizeof(cnt));
    for (int j = 0; j <= n; j++) {
      if (mlen[j] < i + 1) {
        continue;
      }
      if (i == 0 && j == 0) {
        cnt[j] = 1;
        continue;
      }
      if (j >= 2) {
        cnt[j] = cnt[j - 2] + cnt[j - 1];
        cnt[j] += KMP(suf[j - 2], prf[j - 1], ans);
      }
      if (cnt[j] > k) {
        cnt[n] = cnt[j];
        break;
      }
    }
    if (cnt[n] < k) {
      ans.pop_back();
      ans.push_back('1');
      k -= cnt[n];
    }
    if (issufffix(suf[n], ans)) k--;
    if (k == 0) break;
  }
  cout << ans << endl;
}

### Prompt

Construct a Cpp code solution to the problem outlined:

Let's denote (yet again) the sequence of Fibonacci strings:

F(0) =  0, F(1) =  1, F(i) = F(i - 2) + F(i - 1), where the plus sign denotes the concatenation of two strings.

Let's denote the lexicographically sorted sequence of suffixes of string F(i) as A(F(i)). For example, F(4) is 01101, and A(F(4)) is the following sequence: 01, 01101, 1, 101, 1101. Elements in this sequence are numbered from 1.

Your task is to print m first characters of k-th element of A(F(n)). If there are less than m characters in this suffix, then output the whole suffix.

Input

The only line of the input contains three numbers n, k and m (1 ≤ n, m ≤ 200, 1 ≤ k ≤ 10^{18}) denoting the index of the Fibonacci string you have to consider, the index of the element of A(F(n)) and the number of characters you have to output, respectively.

It is guaranteed that k does not exceed the length of F(n).

Output

Output m first characters of k-th element of A(F(n)), or the whole element if its length is less than m.

Examples

Input

4 5 3


Output

110


Input

4 3 3


Output

1

### Response

```cpp
#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
string suf[205], prf[205], fib[205];
long long mlen[205];
long long cnt[205];
int n, m;
long long k;
int pi[205];
string ans;
inline bool issufffix(string mstr, string a) {
  if (a.length() > mstr.length()) return false;
  return (mstr.substr(mstr.length() - a.length(), mstr.length()) == a);
}
int KMP(string a, string b, string mkey) {
  if (a.length() > mkey.length()) {
    a = a.substr(a.length() - mkey.length(), a.length());
  }
  if (b.length() > mkey.length()) {
    b = b.substr(0, mkey.length());
  }
  string c = a + b;
  pi[0] = -1;
  int ret = 0;
  int j = -1;
  for (int i = 1; i < mkey.length(); i++) {
    while (j >= 0 && mkey[j + 1] != mkey[i]) {
      j = pi[j];
    }
    if (mkey[j + 1] == mkey[i]) j++;
    pi[i] = j;
  }
  j = -1;
  for (int i = 0; i < c.length(); i++) {
    while (j >= 0 && c[i] != mkey[j + 1]) {
      j = pi[j];
    }
    if (c[i] == mkey[j + 1]) j++;
    if (j + 1 == mkey.length()) {
      ret++;
      j = -1;
    }
  }
  if (mkey.compare(a) == 0) ret--;
  if (mkey.compare(b) == 0) ret--;
  return ret;
}
inline void CalcFib() {
  fib[0] = "0";
  fib[1] = "1";
  for (int i = 2; i <= 5; i++) {
    fib[i] = fib[i - 2] + fib[i - 1];
  }
  cout << fib[5] << endl;
}
int main() {
  prf[0] = "0";
  suf[0] = "0";
  prf[1] = "1";
  suf[1] = "1";
  mlen[0] = 1;
  mlen[1] = 1;
  scanf("%d%lld%d", &n, &k, &m);
  for (int i = 2; i <= n; i++) {
    mlen[i] = mlen[i - 2] + mlen[i - 1];
    if (mlen[i] <= m) {
      prf[i] = prf[i - 2] + prf[i - 1];
      suf[i] = suf[i - 2] + suf[i - 1];
    } else if (mlen[i - 1] < m) {
      int tx = m - mlen[i - 1];
      suf[i] = suf[i - 2].substr(mlen[i - 2] - tx, mlen[i - 2]) + suf[i - 1];
      tx = m - mlen[i - 2];
      prf[i] = prf[i - 2] + prf[i - 1].substr(0, tx);
    } else if (mlen[i - 2] < m) {
      suf[i] = suf[i - 1];
      int tx = m - mlen[i - 2];
      prf[i] = prf[i - 2] + prf[i - 1].substr(0, tx);
    } else {
      suf[i] = suf[i - 1];
      prf[i] = prf[i - 2];
    }
    if (mlen[i] > m) {
      mlen[i] = m + 1;
    }
  }
  for (int i = 0; i < m; i++) {
    ans.push_back('0');
    memset(cnt, 0, sizeof(cnt));
    for (int j = 0; j <= n; j++) {
      if (mlen[j] < i + 1) {
        continue;
      }
      if (i == 0 && j == 0) {
        cnt[j] = 1;
        continue;
      }
      if (j >= 2) {
        cnt[j] = cnt[j - 2] + cnt[j - 1];
        cnt[j] += KMP(suf[j - 2], prf[j - 1], ans);
      }
      if (cnt[j] > k) {
        cnt[n] = cnt[j];
        break;
      }
    }
    if (cnt[n] < k) {
      ans.pop_back();
      ans.push_back('1');
      k -= cnt[n];
    }
    if (issufffix(suf[n], ans)) k--;
    if (k == 0) break;
  }
  cout << ans << endl;
}

```