Python program to find the minimum path