\documentclass{article}
\usepackage{a4wide}
\usepackage{adjustbox}
\usepackage{fancyhdr}
\usepackage{tikz}
\usepackage{ifthen}
\usetikzlibrary{automata}
\usepackage{datetime}
\lhead{./certificates/march3testa1-march3testa2/sim-436.tex}
\rhead{10:47:37.875 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 (5,-14) (n0n0n0n1n0n1n0) {$p!$\,\ifntiny{\tiny 695}\fi};
\node[accepting, state] at (5,-12) (n0n0n0n1n0n1) {$p?$\,\ifntiny{\tiny 696}\fi};
\node[accepting, state] at (4,-10) (n0n0n0n1n0) {$p?$\,\ifntiny{\tiny 697}\fi};
\node[initial, state] at (7,0) (n) {$p?$\,\ifntiny{\tiny 4117}\fi};
\node[accepting, state] at (13,-10) (n0n2n0n1n0) {$p!$\,\ifntiny{\tiny 1866}\fi};
\node[accepting, state] at (13,-8) (n0n2n0n1) {$p?$\,\ifntiny{\tiny 1867}\fi};
\node[accepting, state] at (12,-6) (n0n2n0) {$p?$\,\ifntiny{\tiny 1868}\fi};
\node[state] at (7,-2) (n0) {$\cup$\,\ifntiny{\tiny 4116}\fi};
\node[accepting, state] at (2,-12) (n0n0n0n1n0n0) {$p!$\,\ifntiny{\tiny 684}\fi};
\node[state] at (0,-8) (n0n0n0n0) {$p?$\,\ifntiny{\tiny 4112}\fi};
\node[state] at (3,-6) (n0n0n0) {$\cup$\,\ifntiny{\tiny 4113}\fi};
\node[state] at (4,-4) (n0n0) {$p?$\,\ifntiny{\tiny 4114}\fi};
\node[accepting, state] at (10,-8) (n0n2n0n0) {$p!$\,\ifntiny{\tiny 1855}\fi};
\node[state] at (8,-4) (n0n1) {$p?$\,\ifntiny{\tiny 4115}\fi};
\node[accepting, state] at (4,-8) (n0n0n0n1) {$p?$\,\ifntiny{\tiny 698}\fi};
\node[accepting, state] at (12,-4) (n0n2) {$p?$\,\ifntiny{\tiny 1869}\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, left] node {a} (n0n0n0);
\draw[->, thick] (n0n0) edge [near start, right, bend right] node {b} (n);
\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} (n0);
\draw[->, thick] (n0n0n0n1) edge [near start, left] node {a} (n0n0n0n1n0);
\draw[->, thick] (n0n0n0n1n0) edge [near start, left] node {a} (n0n0n0n1n0n0);
\draw[->, thick] (n0n0n0n1n0) edge [near start, left] node {b} (n0n0n0n1n0n1);
\draw[->, thick] (n0n0n0n1n0n0) edge [near start, right, bend right] node {x1} (n0n0n0n1);
\draw[->, thick] (n0n0n0n1n0n0) edge [near start, right, bend right] node {x2} (n0n0n0n1);
\draw[->, thick] (n0n0n0n1n0n0) edge [near start, right, bend right] node {x3} (n0n0n0n1);
\draw[->, thick] (n0n0n0n1n0n1) edge [near start, left] node {a} (n0n0n0n1n0n1n0);
\draw[->, thick] (n0n0n0n1n0n1n0) edge [near start, left, bend left] node {x1} (n0n0n0n1);
\draw[->, thick] (n0n0n0n1n0n1n0) edge [near start, left, bend left] node {x2} (n0n0n0n1);
\draw[->, thick] (n0n0n0n1n0n1n0) edge [near start, left, bend left] node {x3} (n0n0n0n1);
\draw[->, thick] (n0n1) edge [near start, left, bend left] node {a} (n0);
\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}
