#include #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) std::begin(x), std::end(x) using namespace std; using ll = long long; void opvec1(vector &vec); void opvec2(vector> &vec); void opset(set &S); int main() { int N; cin >> N; string ans =""; function f = [&](int n) { ans += '{'; bitset<20> bits(n); bool in = false; rep(i, 20) { if (bits.test(i)) { if (in) ans += ','; f(i); in = true; } } ans += '}'; }; f(N); cout << ans << endl; } // void opvec1(vector &vec) { rep(i, vec.size()) cout << vec[i] << " "; cout << endl; } void opvec2(vector> &vec) { rep(i, vec.size()) { rep(j, vec[0].size()) cout << vec[i][j] << " "; cout << endl; } } void opset(set &S) { for (auto s: S) cout << s << " "; cout << endl; }