\documentclass{article}
\usepackage{a4wide}
\usepackage{adjustbox}
\usepackage{fancyhdr}
\usepackage{tikz}
\usepackage{ifthen}
\usetikzlibrary{automata}
\usepackage{datetime}
\lhead{./certificates/multibranch1-multibranch2/subtype.tex}
\rhead{09:11:48.783 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 = 12
\begin{tikzpicture}[rotate = 0]
%\begin{tikzpicture}[rotate = 90]
\tikzset{initial text=$ $}

\node[state] at (4,-10) (n0n2n1n0n0) {$end$\,\ifntiny{\tiny 40130}\fi};
\node[state] at (4,-8) (n0n2n1n0) {$p?$\,\ifntiny{\tiny 40131}\fi};
\node[initial, state] at (2,0) (n) {$p!$\,\ifntiny{\tiny 40136}\fi};
\node[state] at (2,-4) (n0n1) {$p?$\,\ifntiny{\tiny 40129}\fi};
\node[state] at (4,-4) (n0n2) {$p?$\,\ifntiny{\tiny 40134}\fi};
\node[state] at (3,-6) (n0n2n0) {$end$\,\ifntiny{\tiny 40133}\fi};
\node[state] at (2,-2) (n0) {$p?$\,\ifntiny{\tiny 40135}\fi};
\node[state] at (4,-6) (n0n2n1) {$p?$\,\ifntiny{\tiny 40132}\fi};
\node[state] at (1,-6) (n0n1n0) {$end$\,\ifntiny{\tiny 40127}\fi};
\node[state] at (2,-6) (n0n1n1) {$end$\,\ifntiny{\tiny 40128}\fi};
\node[state] at (0,-6) (n0n0n0) {$end$\,\ifntiny{\tiny 40125}\fi};
\node[state] at (0,-4) (n0n0) {$p?$\,\ifntiny{\tiny 40126}\fi};

\draw[->, thick] (n) edge [near start, left] node {x} (n0);
\draw[->, thick] (n0) edge [near start, left] node {a1} (n0n0);
\draw[->, thick] (n0) edge [near start, left] node {a2} (n0n1);
\draw[->, thick] (n0) edge [near start, left] node {a3} (n0n2);
\draw[->, thick] (n0n0) edge [near start, left] node {b} (n0n0n0);
\draw[->, thick] (n0n1) edge [near start, left] node {b1} (n0n1n0);
\draw[->, thick] (n0n1) edge [near start, left] node {b2} (n0n1n1);
\draw[->, thick] (n0n2) edge [near start, left] node {a1} (n0n2n0);
\draw[->, thick] (n0n2) edge [near start, left] node {c1} (n0n2n1);
\draw[->, thick] (n0n2n1) edge [near start, left] node {c2} (n0n2n1n0);
\draw[->, thick] (n0n2n1n0) edge [near start, left] node {c3} (n0n2n1n0n0);

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