digraph { struct1 [shape=record, label="...| $a_k$ | $a_{k+1}$| $a_{k+2}$ | ... | ... | $a_{k+r-1}$ | $a_{k+r}$|...",pos="2,2!"]; q0 [label="$q_0$",pos="0,1!"] q1 [label="$q_1$",pos="0.8,1!"] q2 [label="$q_2$",pos="1.6,1!"] qd1 [label="...",pos="2.4,1!"] qd2 [label="...",pos="3.2,1!"] qrm1 [label="$q_{r-1}$",pos="4.06,1!"] s [label="$\sum$", pos="6,0!"] struct1:ak -> q0 struct1:akp1 -> q1 struct1:akp2 -> q2 struct1:akprm1 -> qrm1 struct1:akpd1 -> qd1 struct1:akpd2 -> qd2 q0:s -> s q1:s -> s q2:s -> s qrm1:s -> s qd1:s -> s qd2:s -> s s -> struct1:akpr:s [label="$\mod p$"] }