#!/usr/bin/env python3
import struct
import sys

def main():
    if len(sys.argv) < 2:
        sys.exit("Usage: {} FILE".format(sys.argv[0]))

    filename = sys.argv[1]
    b = open(filename, 'rb').read()
    if len(b) % 4 != 0:
        sys.exit("length of {} is not a multiple of 4".format(filename))
    for i in range(len(b)):
        print('{:08b}'.format(b[i]))

if __name__ == '__main__':
    main()
