\documentclass{article}
\usepackage{a4wide}
\usepackage{adjustbox}
\usepackage{fancyhdr}
\usepackage{tikz}
\usepackage{ifthen}
\usetikzlibrary{automata}
\usepackage{datetime}
\lhead{./certificates/14may2-14may1/sim-9188.tex}
\rhead{08:49:42.961 on 2025-04-03}
\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 (17,-8) (n2n0n1n1) {$end$\,\ifntiny{\tiny 9332}\fi};
\node[accepting, state] at (16,-4) (n2n0) {$p?$\,\ifntiny{\tiny 9334}\fi};
\node[accepting, state] at (17,-6) (n2n0n1) {$p!$\,\ifntiny{\tiny 9333}\fi};
\node[accepting, state] at (12,-10) (n1n0n0n1n1) {$end$\,\ifntiny{\tiny 9216}\fi};
\node[accepting, state] at (1,-10) (n0n0n1n0n0) {$p!$\,\ifntiny{\tiny 9328}\fi};
\node[accepting, state] at (19,-4) (n2n1) {$p!$\,\ifntiny{\tiny 9339}\fi};
\node[initial, state] at (10,0) (n) {$\cup$\,\ifntiny{\tiny 9393}\fi};
\node[state] at (3,-4) (n0n0) {$\cup$\,\ifntiny{\tiny 9391}\fi};
\node[state] at (8,-4) (n0n1) {$\cup$\,\ifntiny{\tiny 9388}\fi};
\node[accepting, state] at (11,-6) (n1n0n0) {$p?$\,\ifntiny{\tiny 9218}\fi};
\node[accepting, state] at (15,-6) (n2n0n0) {$p!$\,\ifntiny{\tiny 9328}\fi};
\node[accepting, state] at (17,-2) (n2) {$p?$\,\ifntiny{\tiny 9340}\fi};
\node[accepting, state] at (7,-8) (n0n1n0n1) {$end$\,\ifntiny{\tiny 9318}\fi};
\node[accepting, state] at (3,-10) (n0n0n1n0n1) {$p!$\,\ifntiny{\tiny 9333}\fi};
\node[accepting, state] at (12,-2) (n1) {$p?$\,\ifntiny{\tiny 9212}\fi};
\node[accepting, state] at (2,-8) (n0n0n1n0) {$p?$\,\ifntiny{\tiny 9334}\fi};
\node[accepting, state] at (5,-8) (n0n0n1n1) {$p!$\,\ifntiny{\tiny 9339}\fi};
\node[accepting, state] at (11,-4) (n1n0) {$p!$\,\ifntiny{\tiny 9206}\fi};
\node[accepting, state] at (3,-12) (n0n0n1n0n1n1) {$end$\,\ifntiny{\tiny 9332}\fi};
\node[accepting, state] at (7,-6) (n0n1n0) {$p!$\,\ifntiny{\tiny 9319}\fi};
\node[accepting, state] at (9,-6) (n0n1n1) {$p!$\,\ifntiny{\tiny 9346}\fi};
\node[accepting, state] at (9,-8) (n0n1n1n1) {$end$\,\ifntiny{\tiny 9345}\fi};
\node[accepting, state] at (5,-10) (n0n0n1n1n1) {$end$\,\ifntiny{\tiny 9338}\fi};
\node[accepting, state] at (12,-8) (n1n0n0n1) {$p!$\,\ifntiny{\tiny 9217}\fi};
\node[accepting, state] at (3,-6) (n0n0n1) {$p?$\,\ifntiny{\tiny 9340}\fi};
\node[accepting, state] at (14,-6) (n1n1n1) {$end$\,\ifntiny{\tiny 9210}\fi};
\node[accepting, state] at (14,-4) (n1n1) {$p!$\,\ifntiny{\tiny 9211}\fi};
\node[state] at (5,-2) (n0) {$p?$\,\ifntiny{\tiny 9392}\fi};
\node[accepting, state] at (19,-6) (n2n1n1) {$end$\,\ifntiny{\tiny 9338}\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 {b} (n1n0n0);
\draw[->, thick] (n1n0n0) edge [near start, right, bend right] node {a} (n1);
\draw[->, thick] (n1n0n0) edge [near start, left] node {c} (n1n0n0n1);
\draw[->, thick] (n1n0n0n1) edge [near start, above, loop left] node {b} (n1n0n0n1);
\draw[->, thick] (n1n0n0n1) edge [near start, left] node {d} (n1n0n0n1n1);
\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 {a} (n2n0n0);
\draw[->, thick] (n2n0) edge [near start, left] node {c} (n2n0n1);
\draw[->, thick] (n2n0n0) edge [near start, right, bend right] node {b} (n2);
\draw[->, thick] (n2n0n1) edge [near start, above, loop left] node {b} (n2n0n1);
\draw[->, thick] (n2n0n1) edge [near start, left] node {d} (n2n0n1n1);
\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}
