Since the Op appears stuck with this issue, lets see if we can decipher the scrambled data and make some sense of the task at hand.

Firstly when SamT and myself suggested that you create a Matrix this is what we had in mind

A B C D E F G H J Z
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6

A table Matrix allows a User to show data relationships between two or more defined values. In this case we are showing the potential relationship between Line Numbers (Vertically) and Waypoints (Horizontally). You will note, they are also listed sequentially.

Next we needed to convert your scrambled data into something more meaningful. Rather than confuse Users with numbers I have used colours to show the related data in a more logical detail.

A B C D E F G H J Z
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
From the above matrix we can show two sets of data, namely;
1. Reading Horizontally: Waypoints that lie upon each Line, and
2. Reading Vertically: Waypoints that show common Lines.


The task at hand is to show a "Train" starting at Waypoint A on Line 3 (Cell A3) and Finishing at Waypoint Z. What Waypoints does it need to pass through?

Firstly we need to set up a set of Rules to be used in conjunction with the Matrix.
1. For a "Train" to move forward, it cannot regain any cell within the Table that it has previously occupied.
2. Any Movement between the cells can only be Horizontally or Vertically. No Diagonal moves allowed.
3. You may jump from coloured cell to coloured cell providing you follow Rule 2.

A B C D E F G H J Z
Line 1
A1
B1 C1 D1 E1 F1 G1 H1 J1 Z1
Line 2 A2 B2 C2 D2 E2 F2 G2 H2 J1 Z2
Line 3 A3 B3 C3 D3 E3 F3 G3 H3 J3 Z3
Line 4 A4 B4 C4 D4 E4 F4 G4 H4 J4 Z4
Line 5 A5 B5 C5 D5 E5 F5 G5 H5 J5 Z5
Line 6 A6 B6 C6 D6 E6 F6 G6 H6 J6 Z6


There are currently two possible routes under the set of rules.
1. A3, B3, C3, C2, E2, E1, D1, D6, F6, J6, J5, Z5, or
2. A3, B3, B4, F4, F6, J6, J5, Z5.