\documentclass{article}
\usepackage{a4wide}
\usepackage{adjustbox}
\usepackage{fancyhdr}
\usepackage{tikz}
\usepackage{ifthen}
\usetikzlibrary{automata}
\usepackage{datetime}
\lhead{./certificates/trickySub-trickySup/sim-3.tex}
\rhead{11:21:56.082 on 2025-03-31}
\fancyfoot{}
\begin{document}
\newif\ifntiny
%\ntinyfalse
\ntinytrue
\thispagestyle{fancy}
\begin{center}
\maxsizebox{!}{0.475\textheight}{
\minsizebox{\textwidth}{!}{
\begin{tabular}{@{}c@{}}
% node count = 29
\begin{tikzpicture}[rotate = 0]
%\begin{tikzpicture}[rotate = 90]
\tikzset{initial text=$ $}

\node[accepting, state] at (3,-16) (n0n0n0n0n1n0n1n0) {$q!$\,\ifntiny{\tiny 3669}\fi};
\node[state] at (3,-12) (n0n0n0n0n1n0) {$\cup$\,\ifntiny{\tiny 3775}\fi};
\node[accepting, state] at (15,-4) (n1n0) {$p!$\,\ifntiny{\tiny 3745}\fi};
\node[accepting, state] at (5,-10) (n0n0n0n1n0) {$q!$\,\ifntiny{\tiny 3702}\fi};
\node[accepting, state] at (16,-8) (n1n1n0n0) {$q!$\,\ifntiny{\tiny 3751}\fi};
\node[state] at (9,-10) (n0n0n1n0n0) {$p!$\,\ifntiny{\tiny 3766}\fi};
\node[accepting, state] at (12,-12) (n0n0n1n0n1n0) {$q!$\,\ifntiny{\tiny 3726}\fi};
\node[initial, state] at (9,0) (n) {$\cup$\,\ifntiny{\tiny 3790}\fi};
\node[state] at (2,-16) (n0n0n0n0n1n0n0n1) {$p!$\,\ifntiny{\tiny 3773}\fi};
\node[state] at (7,-2) (n0) {$p!$\,\ifntiny{\tiny 3780}\fi};
\node[accepting, state] at (17,-6) (n1n1n0) {$p!$\,\ifntiny{\tiny 3753}\fi};
\node[state] at (16,-2) (n1) {$p!$\,\ifntiny{\tiny 3789}\fi};
\node[state] at (3,-10) (n0n0n0n0n1) {$p!$\,\ifntiny{\tiny 3776}\fi};
\node[accepting, state] at (13,-10) (n0n0n1n0n1) {$p!$\,\ifntiny{\tiny 3732}\fi};
\node[accepting, state] at (10,-14) (n0n0n1n0n0n0n1) {$p!$\,\ifntiny{\tiny 3708}\fi};
\node[state] at (2,-14) (n0n0n0n0n1n0n0) {$p!$\,\ifntiny{\tiny 3774}\fi};
\node[state] at (9,-12) (n0n0n1n0n0n0) {$\cup$\,\ifntiny{\tiny 3765}\fi};
\node[state] at (10,-8) (n0n0n1n0) {$\cup$\,\ifntiny{\tiny 3767}\fi};
\node[accepting, state] at (4,-14) (n0n0n0n0n1n0n1) {$p!$\,\ifntiny{\tiny 3679}\fi};
\node[accepting, state] at (9,-16) (n0n0n1n0n0n0n1n0) {$q!$\,\ifntiny{\tiny 3702}\fi};
\node[state] at (8,-14) (n0n0n1n0n0n0n0) {$p!$\,\ifntiny{\tiny 3764}\fi};
\node[state] at (8,-16) (n0n0n1n0n0n0n0n1) {$p!$\,\ifntiny{\tiny 3763}\fi};
\node[state] at (2,-8) (n0n0n0n0) {$p!$\,\ifntiny{\tiny 3777}\fi};
\node[state] at (3,-6) (n0n0n0) {$\cup$\,\ifntiny{\tiny 3778}\fi};
\node[state] at (7,-4) (n0n0) {$p!$\,\ifntiny{\tiny 3779}\fi};
\node[state] at (10,-6) (n0n0n1) {$p!$\,\ifntiny{\tiny 3768}\fi};
\node[state] at (17,-4) (n1n1) {$p!$\,\ifntiny{\tiny 3788}\fi};
\node[accepting, state] at (14,-6) (n1n0n0) {$q!$\,\ifntiny{\tiny 3743}\fi};
\node[accepting, state] at (6,-8) (n0n0n0n1) {$p!$\,\ifntiny{\tiny 3708}\fi};

\draw[->, thick] (n) edge [near start, left] node {} (n0);
\draw[->, thick] (n) edge [near start, left] node {} (n1);
\draw[->, thick] (n0) edge [near start, left] node {a} (n0n0);
\draw[->, thick] (n0n0) edge [near start, left] node {a} (n0n0n0);
\draw[->, thick] (n0n0) edge [near start, left] node {b} (n0n0n1);
\draw[->, thick] (n0n0n0) edge [near start, left] node {} (n0n0n0n0);
\draw[->, thick] (n0n0n0) edge [near start, left] node {} (n0n0n0n1);
\draw[->, thick] (n0n0n0n0) edge [near start, right, bend right] node {a} (n0n0n0);
\draw[->, thick] (n0n0n0n0) edge [near start, left] node {b} (n0n0n0n0n1);
\draw[->, thick] (n0n0n0n0n1) edge [near start, left] node {a} (n0n0n0n0n1n0);
\draw[->, thick] (n0n0n0n0n1n0) edge [near start, left] node {} (n0n0n0n0n1n0n0);
\draw[->, thick] (n0n0n0n0n1n0) edge [near start, left] node {} (n0n0n0n0n1n0n1);
\draw[->, thick] (n0n0n0n0n1n0n0) edge [near start, right, bend right] node {a} (n0n0n0);
\draw[->, thick] (n0n0n0n0n1n0n0) edge [near start, left] node {b} (n0n0n0n0n1n0n0n1);
\draw[->, thick] (n0n0n0n0n1n0n0n1) edge [near start, right, bend right] node {a} (n0n0n0n0n1n0);
\draw[->, thick] (n0n0n0n0n1n0n1) edge [near start, left] node {a} (n0n0n0n0n1n0n1n0);
\draw[->, thick] (n0n0n0n0n1n0n1) edge [near start, above, loop left] node {b} (n0n0n0n0n1n0n1);
\draw[->, thick] (n0n0n0n0n1n0n1n0) edge [near start, right, bend right] node {a} (n0n0n0n0n1n0n1);
\draw[->, thick] (n0n0n0n1) edge [near start, left] node {a} (n0n0n0n1n0);
\draw[->, thick] (n0n0n0n1) edge [near start, above, loop left] node {b} (n0n0n0n1);
\draw[->, thick] (n0n0n0n1n0) edge [near start, right, bend right] node {a} (n0n0n0n1);
\draw[->, thick] (n0n0n1) edge [near start, left] node {a} (n0n0n1n0);
\draw[->, thick] (n0n0n1n0) edge [near start, left] node {} (n0n0n1n0n0);
\draw[->, thick] (n0n0n1n0) edge [near start, left] node {} (n0n0n1n0n1);
\draw[->, thick] (n0n0n1n0n0) edge [near start, left] node {a} (n0n0n1n0n0n0);
\draw[->, thick] (n0n0n1n0n0) edge [near start, right, bend right] node {b} (n0n0n1);
\draw[->, thick] (n0n0n1n0n0n0) edge [near start, left] node {} (n0n0n1n0n0n0n0);
\draw[->, thick] (n0n0n1n0n0n0) edge [near start, left] node {} (n0n0n1n0n0n0n1);
\draw[->, thick] (n0n0n1n0n0n0n0) edge [near start, right, bend right] node {a} (n0n0n1n0n0n0);
\draw[->, thick] (n0n0n1n0n0n0n0) edge [near start, left] node {b} (n0n0n1n0n0n0n0n1);
\draw[->, thick] (n0n0n1n0n0n0n0n1) edge [near start, right, bend right] node {a} (n0n0n1n0);
\draw[->, thick] (n0n0n1n0n0n0n1) edge [near start, left] node {a} (n0n0n1n0n0n0n1n0);
\draw[->, thick] (n0n0n1n0n0n0n1) edge [near start, above, loop left] node {b} (n0n0n1n0n0n0n1);
\draw[->, thick] (n0n0n1n0n0n0n1n0) edge [near start, right, bend right] node {a} (n0n0n1n0n0n0n1);
\draw[->, thick] (n0n0n1n0n1) edge [near start, left] node {a} (n0n0n1n0n1n0);
\draw[->, thick] (n0n0n1n0n1) edge [near start, above, loop left] node {b} (n0n0n1n0n1);
\draw[->, thick] (n0n0n1n0n1n0) edge [near start, right, bend right] node {a} (n0n0n1n0n1);
\draw[->, thick] (n1) edge [near start, left] node {a} (n1n0);
\draw[->, thick] (n1) edge [near start, left] node {b} (n1n1);
\draw[->, thick] (n1n0) edge [near start, left] node {a} (n1n0n0);
\draw[->, thick] (n1n0) edge [near start, above, loop left] node {b} (n1n0);
\draw[->, thick] (n1n0n0) edge [near start, right, bend right] node {a} (n1n0);
\draw[->, thick] (n1n1) edge [near start, left] node {a} (n1n1n0);
\draw[->, thick] (n1n1n0) edge [near start, left] node {a} (n1n1n0n0);
\draw[->, thick] (n1n1n0) edge [near start, above, loop left] node {b} (n1n1n0);
\draw[->, thick] (n1n1n0n0) edge [near start, right, bend right] node {a} (n1n1n0);

\end{tikzpicture}
\end{tabular}}}
\end{center}
\end{document}
