Seems to be working, but the path is not printing right

Realized I needed to print in reverse order, modified your code and
likely broke it. Rewrote my own function, but it is getting to late to
fix it. See you tomorrow