\documentclass{article}
\usepackage{a4wide}
\usepackage{adjustbox}
\usepackage{fancyhdr}
\usepackage{tikz}
\usepackage{ifthen}
\usetikzlibrary{automata}
\usepackage{datetime}
\lhead{./certificates/mario-b-ex2/sim-37642.tex}
\rhead{09:11:48.756 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 = 28
\begin{tikzpicture}[rotate = 0]
%\begin{tikzpicture}[rotate = 90]
\tikzset{initial text=$ $}

\node[state] at (7,-2) (n1) {$p?$\,\ifntiny{\tiny 39555}\fi};
\node[accepting, state] at (3,-40) (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0n0n0n0n0n0) {$p?$\,\ifntiny{\tiny 39506}\fi};
\node[accepting, state] at (3,-42) (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0n0n0n0n0n0n0) {$p!$\,\ifntiny{\tiny 39505}\fi};
\node[state] at (3,-22) (n0n0n0n0n0n0n0n0n0n1n0) {$\cup$\,\ifntiny{\tiny 39542}\fi};
\node[state] at (6,-8) (n0n0n0n1) {$p?$\,\ifntiny{\tiny 39551}\fi};
\node[state] at (3,-20) (n0n0n0n0n0n0n0n0n0n1) {$p?$\,\ifntiny{\tiny 39543}\fi};
\node[state] at (3,-2) (n0) {$p?$\,\ifntiny{\tiny 39554}\fi};
\node[state] at (4,-24) (n0n0n0n0n0n0n0n0n0n1n0n1) {$p?$\,\ifntiny{\tiny 39541}\fi};
\node[accepting, state] at (3,-32) (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0n0) {$p?$\,\ifntiny{\tiny 39510}\fi};
\node[initial, state] at (4,0) (n) {$\cup$\,\ifntiny{\tiny 39556}\fi};
\node[state] at (5,-14) (n0n0n0n0n0n0n1) {$p?$\,\ifntiny{\tiny 39547}\fi};
\node[accepting, state] at (3,-30) (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0) {$p?$\,\ifntiny{\tiny 39511}\fi};
\node[state] at (2,-26) (n0n0n0n0n0n0n0n0n0n1n0n0n0) {$\cup$\,\ifntiny{\tiny 39539}\fi};
\node[accepting, state] at (3,-36) (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0n0n0n0) {$p?$\,\ifntiny{\tiny 39508}\fi};
\node[accepting, state] at (3,-34) (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0n0n0) {$p?$\,\ifntiny{\tiny 39509}\fi};
\node[state] at (0,-20) (n0n0n0n0n0n0n0n0n0n0) {$p?$\,\ifntiny{\tiny 39535}\fi};
\node[state] at (2,-18) (n0n0n0n0n0n0n0n0n0) {$\cup$\,\ifntiny{\tiny 39544}\fi};
\node[state] at (2,-16) (n0n0n0n0n0n0n0n0) {$p?$\,\ifntiny{\tiny 39545}\fi};
\node[state] at (2,-14) (n0n0n0n0n0n0n0) {$p?$\,\ifntiny{\tiny 39546}\fi};
\node[state] at (3,-12) (n0n0n0n0n0n0) {$\cup$\,\ifntiny{\tiny 39548}\fi};
\node[state] at (3,-10) (n0n0n0n0n0) {$p?$\,\ifntiny{\tiny 39549}\fi};
\node[state] at (3,-8) (n0n0n0n0) {$p?$\,\ifntiny{\tiny 39550}\fi};
\node[state] at (3,-6) (n0n0n0) {$\cup$\,\ifntiny{\tiny 39552}\fi};
\node[state] at (3,-4) (n0n0) {$p?$\,\ifntiny{\tiny 39553}\fi};
\node[accepting, state] at (3,-38) (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0n0n0n0n0) {$p?$\,\ifntiny{\tiny 39507}\fi};
\node[state] at (2,-24) (n0n0n0n0n0n0n0n0n0n1n0n0) {$p?$\,\ifntiny{\tiny 39540}\fi};
\node[state] at (1,-28) (n0n0n0n0n0n0n0n0n0n1n0n0n0n0) {$p?$\,\ifntiny{\tiny 39538}\fi};
\node[accepting, state] at (3,-28) (n0n0n0n0n0n0n0n0n0n1n0n0n0n1) {$p?$\,\ifntiny{\tiny 39512}\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 {b} (n0n0);
\draw[->, thick] (n0n0) edge [near start, left] node {a} (n0n0n0);
\draw[->, thick] (n0n0n0) edge [near start, left] node {} (n0n0n0n0);
\draw[->, thick] (n0n0n0) edge [near start, left] node {} (n0n0n0n1);
\draw[->, thick] (n0n0n0n0) edge [near start, left] node {b} (n0n0n0n0n0);
\draw[->, thick] (n0n0n0n0n0) edge [near start, left] node {a} (n0n0n0n0n0n0);
\draw[->, thick] (n0n0n0n0n0n0) edge [near start, left] node {} (n0n0n0n0n0n0n0);
\draw[->, thick] (n0n0n0n0n0n0) edge [near start, left] node {} (n0n0n0n0n0n0n1);
\draw[->, thick] (n0n0n0n0n0n0n0) edge [near start, left] node {b} (n0n0n0n0n0n0n0n0);
\draw[->, thick] (n0n0n0n0n0n0n0n0) edge [near start, left] node {a} (n0n0n0n0n0n0n0n0n0);
\draw[->, thick] (n0n0n0n0n0n0n0n0n0) edge [near start, left] node {} (n0n0n0n0n0n0n0n0n0n0);
\draw[->, thick] (n0n0n0n0n0n0n0n0n0) edge [near start, left] node {} (n0n0n0n0n0n0n0n0n0n1);
\draw[->, thick] (n0n0n0n0n0n0n0n0n0n0) edge [near start, right, bend right] node {b} (n0n0n0n0n0n0n0n0);
\draw[->, thick] (n0n0n0n0n0n0n0n0n0n1) edge [near start, left] node {a} (n0n0n0n0n0n0n0n0n0n1n0);
\draw[->, thick] (n0n0n0n0n0n0n0n0n0n1n0) edge [near start, left] node {} (n0n0n0n0n0n0n0n0n0n1n0n0);
\draw[->, thick] (n0n0n0n0n0n0n0n0n0n1n0) edge [near start, left] node {} (n0n0n0n0n0n0n0n0n0n1n0n1);
\draw[->, thick] (n0n0n0n0n0n0n0n0n0n1n0n0) edge [near start, left] node {b} (n0n0n0n0n0n0n0n0n0n1n0n0n0);
\draw[->, thick] (n0n0n0n0n0n0n0n0n0n1n0n0n0) edge [near start, left] node {} (n0n0n0n0n0n0n0n0n0n1n0n0n0n0);
\draw[->, thick] (n0n0n0n0n0n0n0n0n0n1n0n0n0) edge [near start, left] node {} (n0n0n0n0n0n0n0n0n0n1n0n0n0n1);
\draw[->, thick] (n0n0n0n0n0n0n0n0n0n1n0n0n0n0) edge [near start, right, bend right] node {a} (n0n0n0);
\draw[->, thick] (n0n0n0n0n0n0n0n0n0n1n0n0n0n1) edge [near start, left] node {a} (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0);
\draw[->, thick] (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0) edge [near start, left] node {b} (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0n0);
\draw[->, thick] (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0n0) edge [near start, left] node {a} (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0n0n0);
\draw[->, thick] (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0n0n0) edge [near start, left] node {b} (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0n0n0n0);
\draw[->, thick] (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0n0n0n0) edge [near start, left] node {a} (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0n0n0n0n0);
\draw[->, thick] (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0n0n0n0n0) edge [near start, left] node {a} (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0n0n0n0n0n0);
\draw[->, thick] (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0n0n0n0n0n0) edge [near start, left] node {b} (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0n0n0n0n0n0n0);
\draw[->, thick] (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0n0n0n0n0n0n0) edge [near start, right, bend right] node {x} (n0n0n0n0n0n0n0n0n0n1n0n0n0n1);
\draw[->, thick] (n0n0n0n0n0n0n0n0n0n1n0n0n0n1n0n0n0n0n0n0n0) edge [near start, right, bend right] node {y} (n0n0n0n0n0n0n0n0n0n1n0n0n0n1);
\draw[->, thick] (n0n0n0n0n0n0n0n0n0n1n0n1) edge [near start, right, bend right] node {a} (n);
\draw[->, thick] (n0n0n0n0n0n0n1) edge [near start, left, bend left] node {a} (n);
\draw[->, thick] (n0n0n0n1) edge [near start, left, bend left] node {a} (n);
\draw[->, thick] (n1) edge [near start, left, bend left] node {a} (n);

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