#include "bits/stdc++.h" std::vector binarySearch(std::vector a, int left, int right) { std::vector res = a; if (left > right) { return res; } else if (left == right) { res.push_back(left); return res; } int mid = (left + right) / 2; res.push_back(mid); return binarySearch(binarySearch(res, left, mid - 1), mid + 1, right); } int main() { int k; std::cin >> k; std::vector res = binarySearch({1}, 2, (1 << k) - 1); for (int i = 0; i < res.size(); i++) { if (i) std::cout << " "; std::cout << res[i]; } std::cout << std::endl; return 0; }