I want to find the shortest path from point A to point G

No repetition, no turning back

```
A B C D E F G
A 8 6
B 5 10
C 6 9
D 10
E 7
F 11
G
```

or

```
A.B 8
A.C 6
B.D 5
B.E 10
C.D 6
C.F 9
D.G 10
E.G 7
F.G 11
```

I don’t know how to write variables and equations.

Can anyone provide me with a sample?