void print_bin(unsigned long long int a) {
if(a == 0) {
puts("0");
return;
}
unsigned char i = sizeof(unsigned long long) * 8;
unsigned long long int mask = 1;
mask <<= i - 1;
while(~a & mask) a <<= 1, i--;
for(; i > 0; i--) printf("%d", !!(a & mask)), a <<= 1;
puts(NULL);
}