A simple python program to solve flow free problems