\documentclass{article}
\usepackage{a4wide}
\usepackage{adjustbox}
\usepackage{fancyhdr}
\usepackage{tikz}
\usepackage{ifthen}
\usetikzlibrary{automata}
\usepackage{datetime}
\lhead{./certificates/14may2-14may1/sim-1.tex}
\rhead{10:49:14.495 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 (16,-4) (n2n0) {$p!$\,\ifntiny{\tiny 19}\fi};
\node[accepting, state] at (1,-10) (n0n0n1n0n0) {$p!$\,\ifntiny{\tiny 41}\fi};
\node[accepting, state] at (19,-4) (n2n1) {$p!$\,\ifntiny{\tiny 24}\fi};
\node[initial, state] at (10,0) (n) {$\cup$\,\ifntiny{\tiny 206}\fi};
\node[state] at (3,-4) (n0n0) {$\cup$\,\ifntiny{\tiny 204}\fi};
\node[accepting, state] at (17,-10) (n2n0n0n1n1) {$end$\,\ifntiny{\tiny 29}\fi};
\node[accepting, state] at (17,-8) (n2n0n0n1) {$p!$\,\ifntiny{\tiny 30}\fi};
\node[accepting, state] at (10,-6) (n1n0n0) {$p!$\,\ifntiny{\tiny 41}\fi};
\node[accepting, state] at (16,-6) (n2n0n0) {$p?$\,\ifntiny{\tiny 31}\fi};
\node[accepting, state] at (17,-2) (n2) {$p?$\,\ifntiny{\tiny 25}\fi};
\node[accepting, state] at (7,-8) (n0n1n0n1) {$end$\,\ifntiny{\tiny 131}\fi};
\node[accepting, state] at (3,-10) (n0n0n1n0n1) {$p!$\,\ifntiny{\tiny 46}\fi};
\node[accepting, state] at (12,-2) (n1) {$p?$\,\ifntiny{\tiny 53}\fi};
\node[accepting, state] at (2,-8) (n0n0n1n0) {$p?$\,\ifntiny{\tiny 47}\fi};
\node[accepting, state] at (5,-8) (n0n0n1n1) {$p!$\,\ifntiny{\tiny 52}\fi};
\node[accepting, state] at (12,-6) (n1n0n1) {$p!$\,\ifntiny{\tiny 46}\fi};
\node[accepting, state] at (11,-4) (n1n0) {$p?$\,\ifntiny{\tiny 47}\fi};
\node[accepting, state] at (3,-12) (n0n0n1n0n1n1) {$end$\,\ifntiny{\tiny 45}\fi};
\node[accepting, state] at (7,-6) (n0n1n0) {$p!$\,\ifntiny{\tiny 132}\fi};
\node[accepting, state] at (9,-6) (n0n1n1) {$p!$\,\ifntiny{\tiny 59}\fi};
\node[state] at (8,-4) (n0n1) {$\cup$\,\ifntiny{\tiny 201}\fi};
\node[accepting, state] at (12,-8) (n1n0n1n1) {$end$\,\ifntiny{\tiny 45}\fi};
\node[accepting, state] at (9,-8) (n0n1n1n1) {$end$\,\ifntiny{\tiny 58}\fi};
\node[accepting, state] at (5,-10) (n0n0n1n1n1) {$end$\,\ifntiny{\tiny 51}\fi};
\node[accepting, state] at (3,-6) (n0n0n1) {$p?$\,\ifntiny{\tiny 53}\fi};
\node[accepting, state] at (14,-6) (n1n1n1) {$end$\,\ifntiny{\tiny 51}\fi};
\node[accepting, state] at (14,-4) (n1n1) {$p!$\,\ifntiny{\tiny 52}\fi};
\node[state] at (5,-2) (n0) {$p?$\,\ifntiny{\tiny 205}\fi};
\node[accepting, state] at (19,-6) (n2n1n1) {$end$\,\ifntiny{\tiny 23}\fi};

\draw[->, thick] (n) edge [near start, left] node {} (n0);
\draw[->, thick] (n) edge [near start, left] node {} (n1);
\draw[->, thick] (n) edge [near start, left] node {} (n2);
\draw[->, thick] (n0) edge [near start, left] node {a} (n0n0);
\draw[->, thick] (n0) edge [near start, left] node {c} (n0n1);
\draw[->, thick] (n0n0) edge [near start, right, bend right] node {} (n0);
\draw[->, thick] (n0n0) edge [near start, left] node {} (n0n0n1);
\draw[->, thick] (n0n0n1) edge [near start, left] node {a} (n0n0n1n0);
\draw[->, thick] (n0n0n1) edge [near start, left] node {c} (n0n0n1n1);
\draw[->, thick] (n0n0n1n0) edge [near start, left] node {a} (n0n0n1n0n0);
\draw[->, thick] (n0n0n1n0) edge [near start, left] node {c} (n0n0n1n0n1);
\draw[->, thick] (n0n0n1n0n0) edge [near start, right, bend right] node {b} (n0n0n1);
\draw[->, thick] (n0n0n1n0n1) edge [near start, above, loop left] node {b} (n0n0n1n0n1);
\draw[->, thick] (n0n0n1n0n1) edge [near start, left] node {d} (n0n0n1n0n1n1);
\draw[->, thick] (n0n0n1n1) edge [near start, above, loop left] node {b} (n0n0n1n1);
\draw[->, thick] (n0n0n1n1) edge [near start, left] node {d} (n0n0n1n1n1);
\draw[->, thick] (n0n1) edge [near start, left] node {} (n0n1n0);
\draw[->, thick] (n0n1) edge [near start, left] node {} (n0n1n1);
\draw[->, thick] (n0n1n0) edge [near start, above, loop left] node {b} (n0n1n0);
\draw[->, thick] (n0n1n0) edge [near start, left] node {d} (n0n1n0n1);
\draw[->, thick] (n0n1n1) edge [near start, above, loop left] node {b} (n0n1n1);
\draw[->, thick] (n0n1n1) edge [near start, left] node {d} (n0n1n1n1);
\draw[->, thick] (n1) edge [near start, left] node {a} (n1n0);
\draw[->, thick] (n1) edge [near start, left] node {c} (n1n1);
\draw[->, thick] (n1n0) edge [near start, left] node {a} (n1n0n0);
\draw[->, thick] (n1n0) edge [near start, left] node {c} (n1n0n1);
\draw[->, thick] (n1n0n0) edge [near start, right, bend right] node {b} (n1);
\draw[->, thick] (n1n0n1) edge [near start, above, loop left] node {b} (n1n0n1);
\draw[->, thick] (n1n0n1) edge [near start, left] node {d} (n1n0n1n1);
\draw[->, thick] (n1n1) edge [near start, above, loop left] node {b} (n1n1);
\draw[->, thick] (n1n1) edge [near start, left] node {d} (n1n1n1);
\draw[->, thick] (n2) edge [near start, left] node {a} (n2n0);
\draw[->, thick] (n2) edge [near start, left] node {c} (n2n1);
\draw[->, thick] (n2n0) edge [near start, left] node {b} (n2n0n0);
\draw[->, thick] (n2n0n0) edge [near start, right, bend right] node {a} (n2);
\draw[->, thick] (n2n0n0) edge [near start, left] node {c} (n2n0n0n1);
\draw[->, thick] (n2n0n0n1) edge [near start, above, loop left] node {b} (n2n0n0n1);
\draw[->, thick] (n2n0n0n1) edge [near start, left] node {d} (n2n0n0n1n1);
\draw[->, thick] (n2n1) edge [near start, above, loop left] node {b} (n2n1);
\draw[->, thick] (n2n1) edge [near start, left] node {d} (n2n1n1);

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