\documentclass{article}
\usepackage{a4wide}
\usepackage{adjustbox}
\usepackage{fancyhdr}
\usepackage{tikz}
\usepackage{ifthen}
\usetikzlibrary{automata}
\usepackage{datetime}
\lhead{./certificates/march3testa1-march3testa2/sim-5.tex}
\rhead{10:52:32.958 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 = 16
\begin{tikzpicture}[rotate = 0]
%\begin{tikzpicture}[rotate = 90]
\tikzset{initial text=$ $}

\node[accepting, state] at (6,-14) (n0n1n0n1n0n1n0) {$p!$\,\ifntiny{\tiny 1472}\fi};
\node[accepting, state] at (5,-10) (n0n1n0n1n0) {$p?$\,\ifntiny{\tiny 1474}\fi};
\node[initial, state] at (7,0) (n) {$p?$\,\ifntiny{\tiny 3762}\fi};
\node[state] at (0,-4) (n0n0) {$p?$\,\ifntiny{\tiny 3756}\fi};
\node[accepting, state] at (13,-10) (n0n2n0n1n0) {$p!$\,\ifntiny{\tiny 1274}\fi};
\node[accepting, state] at (13,-8) (n0n2n0n1) {$p?$\,\ifntiny{\tiny 1275}\fi};
\node[accepting, state] at (12,-6) (n0n2n0) {$p?$\,\ifntiny{\tiny 1276}\fi};
\node[accepting, state] at (3,-12) (n0n1n0n1n0n0) {$p!$\,\ifntiny{\tiny 1461}\fi};
\node[state] at (7,-2) (n0) {$\cup$\,\ifntiny{\tiny 3761}\fi};
\node[accepting, state] at (5,-8) (n0n1n0n1) {$p?$\,\ifntiny{\tiny 1475}\fi};
\node[accepting, state] at (6,-12) (n0n1n0n1n0n1) {$p?$\,\ifntiny{\tiny 1473}\fi};
\node[state] at (4,-6) (n0n1n0) {$\cup$\,\ifntiny{\tiny 3759}\fi};
\node[accepting, state] at (10,-8) (n0n2n0n0) {$p!$\,\ifntiny{\tiny 1263}\fi};
\node[state] at (5,-4) (n0n1) {$p?$\,\ifntiny{\tiny 3760}\fi};
\node[state] at (1,-8) (n0n1n0n0) {$p?$\,\ifntiny{\tiny 3758}\fi};
\node[accepting, state] at (12,-4) (n0n2) {$p?$\,\ifntiny{\tiny 1277}\fi};

\draw[->, thick] (n) edge [near start, left] node {a} (n0);
\draw[->, thick] (n0) edge [near start, left] node {} (n0n0);
\draw[->, thick] (n0) edge [near start, left] node {} (n0n1);
\draw[->, thick] (n0) edge [near start, left] node {} (n0n2);
\draw[->, thick] (n0n0) edge [near start, right, bend right] node {a} (n0);
\draw[->, thick] (n0n1) edge [near start, left] node {a} (n0n1n0);
\draw[->, thick] (n0n1) edge [near start, right, bend right] node {b} (n);
\draw[->, thick] (n0n1n0) edge [near start, left] node {} (n0n1n0n0);
\draw[->, thick] (n0n1n0) edge [near start, left] node {} (n0n1n0n1);
\draw[->, thick] (n0n1n0n0) edge [near start, right, bend right] node {a} (n0);
\draw[->, thick] (n0n1n0n1) edge [near start, left] node {a} (n0n1n0n1n0);
\draw[->, thick] (n0n1n0n1n0) edge [near start, left] node {a} (n0n1n0n1n0n0);
\draw[->, thick] (n0n1n0n1n0) edge [near start, left] node {b} (n0n1n0n1n0n1);
\draw[->, thick] (n0n1n0n1n0n0) edge [near start, right, bend right] node {x1} (n0n1n0n1);
\draw[->, thick] (n0n1n0n1n0n0) edge [near start, right, bend right] node {x2} (n0n1n0n1);
\draw[->, thick] (n0n1n0n1n0n0) edge [near start, right, bend right] node {x3} (n0n1n0n1);
\draw[->, thick] (n0n1n0n1n0n1) edge [near start, left] node {a} (n0n1n0n1n0n1n0);
\draw[->, thick] (n0n1n0n1n0n1n0) edge [near start, left, bend left] node {x1} (n0n1n0n1);
\draw[->, thick] (n0n1n0n1n0n1n0) edge [near start, left, bend left] node {x2} (n0n1n0n1);
\draw[->, thick] (n0n1n0n1n0n1n0) edge [near start, left, bend left] node {x3} (n0n1n0n1);
\draw[->, thick] (n0n2) edge [near start, left] node {a} (n0n2n0);
\draw[->, thick] (n0n2n0) edge [near start, left] node {a} (n0n2n0n0);
\draw[->, thick] (n0n2n0) edge [near start, left] node {b} (n0n2n0n1);
\draw[->, thick] (n0n2n0n0) edge [near start, right, bend right] node {x1} (n0n2);
\draw[->, thick] (n0n2n0n0) edge [near start, right, bend right] node {x2} (n0n2);
\draw[->, thick] (n0n2n0n0) edge [near start, right, bend right] node {x3} (n0n2);
\draw[->, thick] (n0n2n0n1) edge [near start, left] node {a} (n0n2n0n1n0);
\draw[->, thick] (n0n2n0n1n0) edge [near start, left, bend left] node {x1} (n0n2);
\draw[->, thick] (n0n2n0n1n0) edge [near start, left, bend left] node {x2} (n0n2);
\draw[->, thick] (n0n2n0n1n0) edge [near start, left, bend left] node {x3} (n0n2);

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