#include <bits/stdc++.h>
using namespace std;
long long int change[50 + 1];
int permutation[50 + 1];
int main(int argc, const char* argv[]) {
  int n;
  long long int nth;
  scanf("%d%lld", &n, &nth);
  nth--;
  for (int i = 1; i <= n; i++) {
    permutation[i] = i;
  }
  for (int i = n - 1; i >= 1; i--) {
    change[i] = 1;
    for (int j = i + 1; j <= n; j += 2) {
      change[i] += change[j];
    }
  }
  for (int i = 1; i <= n - 1; i++) {
    if (change[i] > nth) continue;
    nth -= change[i];
    swap(permutation[i], permutation[i + 1]);
    if (nth == 0) break;
    i++;
  }
  for (int i = 1; i <= n; i++) {
    printf("%d ", permutation[i]);
  }
  printf("\n");
  return 0;
}
