solution for 67, which is simply 18 with a larger input file