x,y=input()
for o in d[3*x:][:3]+"$"+d[3*y:][:3]: try:print"%03d"%(int(bin(int(o))[2:]),) except:print'---';continue  Try it online! -3 with thanks to @NieDzejkob Not intended as a serious contender. Just an experiment with binary, exceptions and string formatting. Takes input as 2 integers and outputs in vertical format with 0=space and 1=dot. The$ is there to force an exception. It could actually be anything that cannot be converted to binary.