Create 5.py

Finding the way to go was tricky, but the coding was quick.
Basically at first I tried by reducing the problem's dimensions from the end, and one I came out with reducing it from the beggining it was a quick accomplishment.