Each trellis cell keeps the best predecessor path into that state.
Each step keeps the best predecessor
For each current state, multiply the emission probability by the best previous trellis value times the transition probability.
V(t,s)=es(ot)pmaxV(t−one,p)ap,s
The second column comes from state I
For the second G, state I gets 27/128. State N gets 3/128; its predecessor tie breaks to I.
V(I)=12827,V(N)=1283