#include char res[30][10004]; int main() { int n; scanf("%d", &n); int i, j, k, l; for (i = 0; i < 30; i++) { res[i][0] = '{'; l = 1; for (j = 0; (1 << j) <= i; j++) { if (((1 << j) & i) == 0) continue; for (k = 0; res[j][k] != '\0'; k++, l++) res[i][l] = res[j][k]; } res[i][l] = '}'; res[i][l + 1] = '\0'; } printf("{"); k = 0; for (i = 0; (1 << i) <= n; i++) { if (((1 << i) & n) == 0) continue; if (k > 0) printf(","); printf("%s", res[i]); k++; } printf("}\n"); return 0; }