#include #include using namespace std; int n; int main() { cin >> n; for(int bit = 0; bit < (1 << n); bit++) { cout << "{"; for(int i = 0; i < n; i++) { if(bit & (1 << i)) { cout << i + 1 << " "; } } cout << "}" << endl; } return 0; }