\documentclass{article}
\usepackage{a4wide}
\usepackage{adjustbox}
\usepackage{fancyhdr}
\usepackage{tikz}
\usepackage{ifthen}
\usetikzlibrary{automata}
\usepackage{datetime}
\lhead{./certificates/LSWAq2-LSWAq1/subtype.tex}
\rhead{08:49:42.748 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 = 15
\begin{tikzpicture}[rotate = 0]
%\begin{tikzpicture}[rotate = 90]
\tikzset{initial text=$ $}

\node[state] at (6,-2) (n1) {$r?$\,\ifntiny{\tiny 540}\fi};
\node[state] at (5,-6) (n1n0n1) {$end$\,\ifntiny{\tiny 535}\fi};
\node[state] at (5,-4) (n1n0) {$r!$\,\ifntiny{\tiny 536}\fi};
\node[initial, state] at (4,0) (n) {$p?$\,\ifntiny{\tiny 548}\fi};
\node[state] at (3,-4) (n0n1) {$r!$\,\ifntiny{\tiny 546}\fi};
\node[state] at (4,-6) (n1n0n0) {$end$\,\ifntiny{\tiny 534}\fi};
\node[state] at (2,-2) (n0) {$r?$\,\ifntiny{\tiny 547}\fi};
\node[state] at (6,-6) (n1n1n0) {$end$\,\ifntiny{\tiny 537}\fi};
\node[state] at (2,-6) (n0n1n0) {$end$\,\ifntiny{\tiny 544}\fi};
\node[state] at (3,-6) (n0n1n1) {$end$\,\ifntiny{\tiny 545}\fi};
\node[state] at (0,-6) (n0n0n0) {$end$\,\ifntiny{\tiny 541}\fi};
\node[state] at (1,-4) (n0n0) {$r!$\,\ifntiny{\tiny 543}\fi};
\node[state] at (1,-6) (n0n0n1) {$end$\,\ifntiny{\tiny 542}\fi};
\node[state] at (7,-6) (n1n1n1) {$end$\,\ifntiny{\tiny 538}\fi};
\node[state] at (7,-4) (n1n1) {$r!$\,\ifntiny{\tiny 539}\fi};

\draw[->, thick] (n) edge [near start, left] node {b} (n0);
\draw[->, thick] (n) edge [near start, left] node {m} (n1);
\draw[->, thick] (n0) edge [near start, left] node {b} (n0n0);
\draw[->, thick] (n0) edge [near start, left] node {o} (n0n1);
\draw[->, thick] (n0n0) edge [near start, left] node {b} (n0n0n0);
\draw[->, thick] (n0n0) edge [near start, left] node {o} (n0n0n1);
\draw[->, thick] (n0n1) edge [near start, left] node {b} (n0n1n0);
\draw[->, thick] (n0n1) edge [near start, left] node {o} (n0n1n1);
\draw[->, thick] (n1) edge [near start, left] node {b} (n1n0);
\draw[->, thick] (n1) edge [near start, left] node {o} (n1n1);
\draw[->, thick] (n1n0) edge [near start, left] node {b} (n1n0n0);
\draw[->, thick] (n1n0) edge [near start, left] node {o} (n1n0n1);
\draw[->, thick] (n1n1) edge [near start, left] node {b} (n1n1n0);
\draw[->, thick] (n1n1) edge [near start, left] node {o} (n1n1n1);

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