Initial commit of problem 39 solution