Solved 1-11 by a recursive process.