In this project, given a matrix of integers where each cell represents a weight, you are tasked with writing a program that finds a continuous path that combines any element of the first row with any element of the last row in the matrix, aiming to minimize the sum of items along the path.