#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
int n;
long long m;
long long res[51];
int main() {
  cin >> n >> m;
  res[0] = 1;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= 2 && j <= i; j++) res[i] = min(m, res[i] + res[i - j]);
  for (int i = 0; i < n;)
    for (int j = 1; j <= 2 && j <= n - i; j++)
      if (res[n - i - j] < m)
        m -= res[n - i - j];
      else {
        for (int k = 0; k < j; k++) printf("%d ", (k + j - 1) % j + i + 1);
        i += j;
        break;
      }
  printf("\n");
  return 0;
}
