Context Sensitive Grammar for the language $\{ a^{2n} b^{2n+1} c^{3n} d^{n+3} \mid n \ge 1\}$
In the following grammar the first block of productions ensures that the right amount of $a,b,c$, and $d$ is generated, in some order. The terminal  $a$ is represented by the nonterminal $A$, $b$ by $B$, etc.
They also ensure that $X$, which represents a $a$, is at the end of the sentential form.

The next block ensures that $A,B,C,D$ can be reordered.

The last block ensures that terminals are generated from right to left in the correct order (first $d$, then $c$, then $b$, and finally $a$).

$$
\begin{align*}
S  &amp;\to ABBCCCDS'X \\
S' &amp;\to AABBCCCDS' \mid BDDD\\
\\
BA &amp; \to AB \\
CA &amp; \to AC \\
CB &amp; \to BC \\
DA &amp; \to AD \\
DB &amp; \to BD \\
DC &amp; \to CD \\
\\
DX &amp;\to Xd \\
X &amp;\to Y \\
CY &amp;\to Yc \\
Y &amp;\to W \\
BW &amp;\to Wb \\
W &amp;\to Z \\
AZ &amp;\to Za \\
Z &amp; \to a
\end{align*}
$$