/* Solution to ICS 331 assignment #1
 * by David N. Chin
 * read an int from stdin and print it out as a binary string on stdout
 */

#include <stdio.h>

main() {
  int myint, i, msb = 1 << sizeof(int)*8-1;
  scanf("%d", &myint);
  for(i=sizeof(int)*8-1; i >= 0; i--) {
    printf("%d ", myint & msb ? 1 : 0);
      myint <<= 1;
      if(i%4==0) printf(" ");
  }
  printf("\n");
}

