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

\node[accepting, state] at (2,-2) (n1) {$p?$\,\ifntiny{\tiny 108}\fi};
\node[accepting, state] at (2,-6) (n1n0n1) {$p?$\,\ifntiny{\tiny 106}\fi};
\node[accepting, state] at (2,-4) (n1n0) {$p!$\,\ifntiny{\tiny 107}\fi};
\node[accepting, state] at (2,-8) (n1n0n1n0) {$end$\,\ifntiny{\tiny 105}\fi};
\node[initial, state] at (1,0) (n) {$\cup$\,\ifntiny{\tiny 813}\fi};
\node[state] at (0,-2) (n0) {$p?$\,\ifntiny{\tiny 812}\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, right, bend right] node {b} (n);
\draw[->, thick] (n1) edge [near start, left] node {b} (n1n0);
\draw[->, thick] (n1n0) edge [near start, right, bend right] node {x} (n1);
\draw[->, thick] (n1n0) edge [near start, left] node {y} (n1n0n1);
\draw[->, thick] (n1n0n1) edge [near start, left] node {e} (n1n0n1n0);

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