Sorry, my fault, I didn't explain myself properly.
Those numbers are actually de line itself, and the letters are the waypoints.
We are always talking about one single train, so the question or the aim is to know which waypoints are going to reach that train having in mind that it starts in point A and finishes in point Z (that's to say, build the path of the train).
The table layout you are referring to is the last table, the one you reply with quote.
Do you think that this cannot be done with more data?