I currently try to draw a tikz pic like in Figure 1. It basically is what I want and I could draw it like that for the whole Sequence, but it is very long. Since it is just the same task over and over again I thought I could just put (at least some) into a foreach loop.

Figure 2 was my first try, but as you can see the distances are not alike and not adjustable with `[node distance=0 mm]`. Also I think it will become intricate once the sequence makes a curve.

So I tried something else (Figure 3). This Idea I prefer, but unfortunately it does not work. I fails because the variable `\j` is not defined when the `\foreach` starts and tries to write a node under the `node[draw,circle,be`low =of \j]`node. -> At least I think that this is the problem. So my question is, is it possibly to define a variable`\j`for the`\foreach` loop so she has a starting point?

Is there another approach that could solve the problem?

**Left** = Figure 1; **middle** = Figure 2; **right** = Figure 3

[![enter image description here](https://i.stack.imgur.com/HZDLN.png)](https://i.stack.imgur.com/HZDLN.png) [![enter image description here](https://i.stack.imgur.com/Ldt5K.png)](https://i.stack.imgur.com/Ldt5K.png) [![enter image description here](https://i.stack.imgur.com/6Prmj.png)](https://i.stack.imgur.com/6Prmj.png)

```
\documentclass[tikz,border=3.5 mm]{standalone}
\usetikzlibrary{backgrounds,positioning}

\begin{document}

    \begin{tikzpicture}[node distance=0 mm]

    %   Sequence = GGUCCCAUK

        How it should look like Figure 1
        \node[draw,circle] at (0,0)  (G) {\Large G};
        \node[draw,circle,below=of G] (G) {\Large G};
        \node[draw,circle,below=of G] (U) {\Large U};
        \node[draw,circle,below=of U] (C) {\Large C};
        \node[draw,circle,below=of C] (C) {\Large C};
        \node[draw,circle,below=of C] (C) {\Large C};
        \node[draw,circle,below=of C] (A) {\Large A};
        \node[draw,circle,below left=of A] (U) {\Large U};
        \node[draw,circle,below left=of U] (K) {\Large K};

    % Foreach part works but do not like distances (not easy adjustable) and will maybe make problems later
    %   \foreach \i\j in {1/G,2/G,3/U,4/C,5/C,6/C,7/A}
    %   {   
    %       \node[draw,circle] at (0,-\i)(\j){\Large\j};
    %
    %   }
    %       \node[draw,circle,below left=of A] (U) {\Large U};
    %       \node[draw,circle,below left=of U] (K) {\Large K};

    %   Fails because variable \j is unknown in the beginning
    %   starter node
    %   \node[draw,circle] at (0,0)  (G) {\Large G};
    %
    %   \foreach \i\j in {1/G,2/U,3/C,4/C,5/C,6/A}
    %   {
    %       \i
    %   }

    % Whole Sequence: GGUCCCAUKGUGPAAU\#GDDAGCACUCPGGABUNUGAAPCCAGCGAU??GAGPPCA”AUCUCGGUGGGACCUCCA
    \end{tikzpicture}

\end{document}

```