#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 55;
long long dp[MAX_N];
int n;
int ans[MAX_N];
void dfs(long long k, int i) {
  if (i > n) return;
  int t = n - i + 1;
  if (t == 1) {
  } else if (k <= dp[t - 2]) {
    dfs(k, i + 2);
  } else if (t >= 3 && k <= dp[t - 2] + dp[t - 3]) {
    swap(ans[i + 1], ans[i + 2]);
    dfs(k - dp[t - 2], i + 3);
  } else {
    swap(ans[i], ans[i + 1]);
    dfs(k - dp[t - 2] - (t >= 3 ? dp[t - 3] : 0), i + 2);
  }
}
int main() {
  std::ios_base::sync_with_stdio(false);
  long long k;
  cin >> n >> k;
  dp[0] = dp[1] = 1;
  for (int i = 2; i < MAX_N; ++i) {
    dp[i] += dp[i - 2] * 2;
    if (i >= 3) dp[i] += dp[i - 3];
  }
  for (int i = 1; i <= n; ++i) {
    ans[i] = i;
  }
  dfs(k, 1);
  for (int i = 1; i <= n; ++i) {
    printf("%d%c", ans[i], " \n"[i == n]);
  }
  return 0;
}
