Read in an input file and do four different kinds of recursions