added solution for P29
Added comments to solution.