#include #include using namespace std; using vi=vector; void solve(vi&a, int*&p, int offset, int k) { if(k==0) return; int c=(1<<(k-1))+offset; *p++=c; solve(a, p, offset, k-1); solve(a, p, c, k-1); } int main(void) { int k; while(scanf("%d", &k)==1) { vi a((1<