add triangle array to problem 18. having trouble generating paths in python.