#include <bits/stdc++.h>
using namespace std;
const int N = 205;
int n, m;
long long k;
int ans[205];
long long cnt;
namespace KMP {
static const int M = 205;
int e[M][2], fail[M], tot;
int mark[M];
int que[M], l, r;
int newnod() {
  ++tot;
  e[tot][0] = e[tot][1] = 0;
  mark[tot] = fail[tot] = 0;
  return tot;
}
void clear() { tot = -1, tot = newnod(); }
void insert() {
  int cur = 0;
  for (int i = (1); i < (cnt + 1); i++) {
    int &tmp = e[cur][ans[i]];
    if (!tmp) tmp = newnod();
    cur = tmp;
  }
  mark[cur] = 1;
}
void init() {
  l = 1, r = 0;
  for (int i = (0); i < (2); i++)
    if (e[0][i]) que[++r] = e[0][i];
  while (l <= r) {
    int u = que[l++];
    for (int i = (0); i < (2); i++) {
      int &tmp = e[u][i];
      if (tmp)
        que[++r] = tmp, fail[tmp] = e[fail[u]][i];
      else
        tmp = e[fail[u]][i];
    }
  }
}
}  // namespace KMP
using namespace KMP;
struct node {
  bitset<N> pre, suf;
  long long len;
  node() { len = 0; }
  void pt() {
    cout << pre.to_string() << ' ';
    cout << suf.to_string() << endl;
  }
} f[205];
int mx = 201;
node operator+(node a, node b) {
  node tmp;
  tmp.len = a.len + b.len;
  if (a.len >= mx)
    tmp.pre = a.pre;
  else if (tmp.len <= mx)
    tmp.pre = (a.pre << b.len) | b.pre;
  else {
    long long c = mx - a.len;
    tmp.pre = (a.pre << c) | (b.pre >> (min((long long)mx, b.len) - c));
  }
  if (b.len >= mx)
    tmp.suf = b.suf;
  else if (tmp.len <= mx)
    tmp.suf = (a.suf << b.len) | b.suf;
  else
    tmp.suf = (a.suf << b.len) | b.suf;
  if (tmp.len >= 1e18) tmp.len = 1e18;
  return tmp;
}
long long operator^(node a, node b) {
  int cur = 0, res = 0;
  for (int i = min(a.len - 1, cnt - 2); i >= 0; i--) cur = e[cur][a.suf[i]];
  for (int i = min((long long)mx - 1, b.len - 1), l = 1; i >= 0 && l < cnt;
       l++, i--) {
    cur = e[cur][b.pre[i]];
    if (mark[cur]) res++;
  }
  return res;
}
bool check() {
  for (int i = (1); i < (cnt + 1); i++)
    if (ans[i] != f[n].suf[cnt - i]) return 0;
  return 1;
}
long long g[205];
long long gao() {
  clear();
  insert();
  init();
  g[0] = g[1] = 0;
  if (cnt == 1 && ans[1] == 0) g[0] = 1;
  if (cnt == 1 && ans[1] == 1) g[1] = 1;
  for (int i = (2); i < (n + 1); i++) {
    g[i] = (f[i - 2] ^ f[i - 1]) + g[i - 2] + g[i - 1];
    if (g[i] > 1e18) g[i] = 1e18;
  }
  return g[n];
}
void prt() {
  for (int i = (1); i < (cnt + 1); i++) printf("%d", ans[i]);
  puts("");
}
void solve() {
  f[0].pre = 0, f[0].suf = 0, f[0].len = 1;
  f[1].pre = 1, f[1].suf = 1, f[1].len = 1;
  for (int i = (2); i < (n + 1); i++) f[i] = f[i - 2] + f[i - 1];
  for (int i = (1); i < (m + 1); i++) {
    if (!k) return;
    ans[++cnt] = 0;
    long long b = gao();
    if (b >= k)
      ;
    else if (b < k) {
      ans[cnt] = 1;
      k -= b;
    }
    if (check()) k--;
  }
}
int main() {
  cin >> n >> k >> m;
  solve();
  for (int i = (1); i < (cnt + 1); i++) printf("%d", ans[i]);
  puts("");
  return 0;
}

### Prompt

Develop a solution in cpp to the problem described below:

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>
using namespace std;
const int N = 205;
int n, m;
long long k;
int ans[205];
long long cnt;
namespace KMP {
static const int M = 205;
int e[M][2], fail[M], tot;
int mark[M];
int que[M], l, r;
int newnod() {
  ++tot;
  e[tot][0] = e[tot][1] = 0;
  mark[tot] = fail[tot] = 0;
  return tot;
}
void clear() { tot = -1, tot = newnod(); }
void insert() {
  int cur = 0;
  for (int i = (1); i < (cnt + 1); i++) {
    int &tmp = e[cur][ans[i]];
    if (!tmp) tmp = newnod();
    cur = tmp;
  }
  mark[cur] = 1;
}
void init() {
  l = 1, r = 0;
  for (int i = (0); i < (2); i++)
    if (e[0][i]) que[++r] = e[0][i];
  while (l <= r) {
    int u = que[l++];
    for (int i = (0); i < (2); i++) {
      int &tmp = e[u][i];
      if (tmp)
        que[++r] = tmp, fail[tmp] = e[fail[u]][i];
      else
        tmp = e[fail[u]][i];
    }
  }
}
}  // namespace KMP
using namespace KMP;
struct node {
  bitset<N> pre, suf;
  long long len;
  node() { len = 0; }
  void pt() {
    cout << pre.to_string() << ' ';
    cout << suf.to_string() << endl;
  }
} f[205];
int mx = 201;
node operator+(node a, node b) {
  node tmp;
  tmp.len = a.len + b.len;
  if (a.len >= mx)
    tmp.pre = a.pre;
  else if (tmp.len <= mx)
    tmp.pre = (a.pre << b.len) | b.pre;
  else {
    long long c = mx - a.len;
    tmp.pre = (a.pre << c) | (b.pre >> (min((long long)mx, b.len) - c));
  }
  if (b.len >= mx)
    tmp.suf = b.suf;
  else if (tmp.len <= mx)
    tmp.suf = (a.suf << b.len) | b.suf;
  else
    tmp.suf = (a.suf << b.len) | b.suf;
  if (tmp.len >= 1e18) tmp.len = 1e18;
  return tmp;
}
long long operator^(node a, node b) {
  int cur = 0, res = 0;
  for (int i = min(a.len - 1, cnt - 2); i >= 0; i--) cur = e[cur][a.suf[i]];
  for (int i = min((long long)mx - 1, b.len - 1), l = 1; i >= 0 && l < cnt;
       l++, i--) {
    cur = e[cur][b.pre[i]];
    if (mark[cur]) res++;
  }
  return res;
}
bool check() {
  for (int i = (1); i < (cnt + 1); i++)
    if (ans[i] != f[n].suf[cnt - i]) return 0;
  return 1;
}
long long g[205];
long long gao() {
  clear();
  insert();
  init();
  g[0] = g[1] = 0;
  if (cnt == 1 && ans[1] == 0) g[0] = 1;
  if (cnt == 1 && ans[1] == 1) g[1] = 1;
  for (int i = (2); i < (n + 1); i++) {
    g[i] = (f[i - 2] ^ f[i - 1]) + g[i - 2] + g[i - 1];
    if (g[i] > 1e18) g[i] = 1e18;
  }
  return g[n];
}
void prt() {
  for (int i = (1); i < (cnt + 1); i++) printf("%d", ans[i]);
  puts("");
}
void solve() {
  f[0].pre = 0, f[0].suf = 0, f[0].len = 1;
  f[1].pre = 1, f[1].suf = 1, f[1].len = 1;
  for (int i = (2); i < (n + 1); i++) f[i] = f[i - 2] + f[i - 1];
  for (int i = (1); i < (m + 1); i++) {
    if (!k) return;
    ans[++cnt] = 0;
    long long b = gao();
    if (b >= k)
      ;
    else if (b < k) {
      ans[cnt] = 1;
      k -= b;
    }
    if (check()) k--;
  }
}
int main() {
  cin >> n >> k >> m;
  solve();
  for (int i = (1); i < (cnt + 1); i++) printf("%d", ans[i]);
  puts("");
  return 0;
}

```