First commit for probelm 26, complete solution.