A5. In the figure, each point has a number that indicates the number of ways you can reach that point from A via the shortest route. That number is equal to the sum of the numbers at the points that lie directly before that point on the shortest route. Sometimes it is just one point (on $A E$, $E H, A B, B C$), most often it is two points, and for the points on $F G$, except for $F$, it is three. The answer is 148, the number at $G$.

![](https://cdn.mathpix.com/cropped/2024_04_17_774e242ba19fa9593e58g-2.jpg?height=780&width=739&top_left_y=204&top_left_x=1024)
A5. The side faces of a cube $\begin{gathered}E F G H \\ A B C D\end{gathered}$ are divided into 9 squares by drawing a 3 by 3 rectangular grid on the side faces. An ant crawls along the grid lines of the side faces $A B F E, B C G F$ and $E F G H$ from vertex $A$ to vertex $G$.

How many shortest paths are there from $A$ to $G$ via this grid?

![](https://cdn.mathpix.com/cropped/2024_04_17_6ccf422d4ecbc0dab674g-1.jpg?height=363&width=345&top_left_y=2166&top_left_x=1415)