#include <iostream>
#include <stdint.h>
using namespace std;
int main() {
uint64_t x = 123703;
cout << hex << x << dec << endl;
const int K = 11;
unsigned char idx[K+1]; // need one extra for overwrite protection
unsigned char *dst=idx;
for (unsigned char i = 0; i < 50; i++)
{
*dst = i;
dst += x & 1;
x >>= 1;
}
for (int j = 0; j < K; j++)
cout << (int)idx[j] << " ";
cout << endl;
return 0;
}