%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%  PUZZLE 5  %%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass{article}

\setlength{\textwidth}{160mm}
\setlength{\oddsidemargin}{0mm}
\pagestyle{empty}

\newcommand{\xtypezero}{\begin{picture}(30,0)
          \put(0,0){\line(1,0){30}}
          \end{picture}}

\newcommand{\xtypeone}{\begin{picture}(30,0)
          \put(0,0){\line(1,0){10}}
          \put(10,0){\line(0,-1){5}}
          \put(10,-5){\line(2,1){10}}
          \put(20,0){\line(1,0){10}}
          \end{picture}}

\newcommand{\xtypetwo}{\begin{picture}(30,0)
          \put(0,0){\line(1,0){10}}
          \put(10,0){\line(0,-1){5}}
          \put(10,-5){\line(1,0){10}}
          \put(20,-5){\line(0,1){5}}
          \put(20,0){\line(1,0){10}}
          \end{picture}}

\newcommand{\xtypethree}{\begin{picture}(30,0)
          \put(0,0){\line(1,0){10}}
          \put(10,0){\line(2,-1){10}}
          \put(20,-5){\line(0,1){5}}
          \put(20,0){\line(1,0){10}}
          \end{picture}}

\newcommand{\xtypefour}{\begin{picture}(30,0)
          \put(0,0){\line(1,0){10}}
          \put(15,-5){\line(1,1){5}}
          \put(10,0){\line(1,-1){5}}
          \put(20,0){\line(1,0){10}}
          \end{picture}}

\newcommand{\ytypezero}{\begin{picture}(0,30)
          \put(0,0){\line(0,1){30}}
          \end{picture}}

\newcommand{\ytypeone}{\begin{picture}(0,30)
          \put(0,0){\line(0,1){10}}
          \put(0,10){\line(-1,0){5}}
          \put(-5,10){\line(1,2){5}}
          \put(0,20){\line(0,1){10}}
          \end{picture}}

\newcommand{\ytypetwo}{\begin{picture}(0,30)
          \put(0,0){\line(0,1){10}}
          \put(0,10){\line(-1,0){5}}
          \put(-5,10){\line(0,1){10}}
          \put(-5,20){\line(1,0){5}}
          \put(0,20){\line(0,1){10}}
          \end{picture}}

\newcommand{\ytypethree}{\begin{picture}(0,30)
          \put(0,0){\line(0,1){10}}
          \put(0,20){\line(-1,0){5}}
          \put(0,10){\line(-1,2){5}}
          \put(0,20){\line(0,1){10}}
          \end{picture}}

\newcommand{\ytypefour}{\begin{picture}(0,30)
          \put(0,0){\line(0,1){10}}
          \put(-5,15){\line(1,1){5}}
          \put(0,10){\line(-1,1){5}}
          \put(0,20){\line(0,1){10}}
          \end{picture}}

\newcommand{\letters}[6]{\begin{picture}(30,5)
\put(1,1){#1}
\put(6,1){#2}
\put(11,1){#3}
\put(16,1){#4}
\put(21,1){#5}
\put(26,1){#6}
\end{picture}}

\newcommand{\abcdef}{\letters{A}{B}{C}{D}{E}{F}}
\newcommand{\ghijkl}{\letters{G}{H}{I}{J}{K}{L}}
\newcommand{\mnopqr}{\letters{M}{N}{O}{P}{Q}{R}}
\newcommand{\stuvwy}{\letters{S}{T}{U}{V}{W}{Y}}

\begin{document}

\section*{Puzzle 5}


\setlength{\unitlength}{1mm}
\begin{picture}(150,180)

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypezero}
\put(30,0){\ytypezero}
\put(0,30){\xtypeone}
\put(0,0){\ytypefour}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypezero}
\put(30,0){\ytypetwo}
\put(0,30){\xtypefour}
\put(0,0){\ytypezero}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypezero}
\put(30,0){\ytypefour}
\put(0,30){\xtypeone}
\put(0,0){\ytypetwo}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypezero}
\put(30,0){\ytypefour}
\put(0,30){\xtypetwo}
\put(0,0){\ytypefour}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypezero}
\put(30,0){\ytypefour}
\put(0,30){\xtypefour}
\put(0,0){\ytypefour}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypeone}
\put(30,0){\ytypezero}
\put(0,30){\xtypetwo}
\put(0,0){\ytypethree}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypeone}
\put(30,0){\ytypeone}
\put(0,30){\xtypefour}
\put(0,0){\ytypefour}
\put(12,17){\circle{3.5}}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypeone}
\put(30,0){\ytypethree}
\put(0,30){\xtypethree}
\put(0,0){\ytypetwo}
\put(2,17){\circle{3.5}}
\put(-3,12){\circle{3.5}}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypeone}
\put(30,0){\ytypethree}
\put(0,30){\xtypefour}
\put(0,0){\ytypethree}
\put(22,12){\circle{3.5}}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypetwo}
\put(30,0){\ytypezero}
\put(0,30){\xtypezero}
\put(0,0){\ytypeone}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypetwo}
\put(30,0){\ytypezero}
\put(0,30){\xtypetwo}
\put(0,0){\ytypethree}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypetwo}
\put(30,0){\ytypezero}
\put(0,30){\xtypefour}
\put(0,0){\ytypetwo}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypetwo}
\put(30,0){\ytypethree}
\put(0,30){\xtypethree}
\put(0,0){\ytypeone}
\put(2,7){\circle{3.5}}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypetwo}
\put(30,0){\ytypethree}
\put(0,30){\xtypefour}
\put(0,0){\ytypezero}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypethree}
\put(30,0){\ytypeone}
\put(0,30){\xtypefour}
\put(0,0){\ytypeone}
\put(2,2){\circle{3.5}}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypethree}
\put(30,0){\ytypetwo}
\put(0,30){\xtypeone}
\put(0,0){\ytypeone}
\put(12,7){\circle{3.5}}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypethree}
\put(30,0){\ytypetwo}
\put(0,30){\xtypeone}
\put(0,0){\ytypetwo}
\put(27,22){\circle{3.5}}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypethree}
\put(30,0){\ytypethree}
\put(0,30){\xtypezero}
\put(0,0){\ytypeone}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypethree}
\put(30,0){\ytypethree}
\put(0,30){\xtypefour}
\put(0,0){\ytypezero}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypethree}
\put(30,0){\ytypethree}
\put(0,30){\xtypefour}
\put(0,0){\ytypeone}
\put(7,2){\circle{3.5}}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypefour}
\put(30,0){\ytypezero}
\put(0,30){\xtypetwo}
\put(0,0){\ytypethree}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypefour}
\put(30,0){\ytypeone}
\put(0,30){\xtypezero}
\put(0,0){\ytypezero}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypefour}
\put(30,0){\ytypeone}
\put(0,30){\xtypezero}
\put(0,0){\ytypeone}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypefour}
\put(30,0){\ytypeone}
\put(0,30){\xtypezero}
\put(0,0){\ytypethree}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypefour}
\put(30,0){\ytypeone}
\put(0,30){\xtypethree}
\put(0,0){\ytypezero}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypefour}
\put(30,0){\ytypeone}
\put(0,30){\xtypefour}
\put(0,0){\ytypethree}
\put(7,22){\circle{3.5}}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypefour}
\put(30,0){\ytypetwo}
\put(0,30){\xtypethree}
\put(0,0){\ytypethree}
\put(2,7){\circle{3.5}}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypefour}
\put(30,0){\ytypethree}
\put(0,30){\xtypetwo}
\put(0,0){\ytypezero}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypefour}
\put(30,0){\ytypethree}
\put(0,30){\xtypethree}
\put(0,0){\ytypethree}
\put(22,22){\circle{3.5}}
\end{picture}}

\put(0,0)
{\begin{picture}(30,30)
\put(0,0){\xtypefour}
\put(30,0){\ytypefour}
\put(0,30){\xtypethree}
\put(0,0){\ytypethree}
\put(12,22){\circle{3.5}}
\end{picture}}

\put(0,175){\abcdef}
\multiput(0,170)(30,5){2}{\ghijkl}
\multiput(0,165)(30,5){3}{\mnopqr}
\multiput(0,160)(30,5){4}{\stuvwy}
\multiput(0,155)(0,-20){8}{\multiput(0,0)(30,5){5}{\abcdef}}
\multiput(0,150)(0,-20){8}{\multiput(0,0)(30,5){5}{\ghijkl}}
\multiput(0,145)(0,-20){8}{\multiput(0,0)(30,5){5}{\mnopqr}}
\multiput(0,140)(0,-20){8}{\multiput(0,0)(30,5){5}{\stuvwy}}
\multiput(30,0)(30,5){4}{\abcdef}
\multiput(60,0)(30,5){3}{\ghijkl}
\multiput(90,0)(30,5){2}{\mnopqr}
\put(120,0){\stuvwy}

\end{picture}
\end{document}
