#include #define pb push_back #define mp make_pair #define mt make_tuple #define ll long long #define pii pair #define tii tuple #define N 100005 #define mod 2000003 #define X first #define Y second #define eps 0.0000000001 #define all(x) x.begin(),x.end() #define tot(x) x+1,x+n+1 using namespace std; vectorv, w; string s; int n; int main() { cin.sync_with_stdio(0); cout.sync_with_stdio(0); cin >> n; n--; v.pb("0"); v.pb("1"); for(; n; n--) { w.resize(0); for(auto it : v) { s = it; s.insert(0, "0"); w.pb(s); } reverse(all(v)); for(auto it : v) { s = it; s.insert(0, "1"); w.pb(s); } v = w; } for(auto it : v) cout << it << '\n'; return 0; }