First solution for lattice paths