%C.G. van der Laan, Hunzeweg 57, 9893PB, Garnwerd. Holland. 05941-1525.
%                                                           cgl@risc1.rug.nl
\let\ea=\expandafter \newif\ifpuzzle
\newcount\cnt \puzzletrue \cnt=0
\newdimen\csize\csize=3ex
%
\def\bdata{\bgroup\obeylines\obeyspaces%
\store}
\def\store#1\edata{\egroup\def\data{#1}}
{\obeyspaces\global\let =\relax}
\def\usersize{}
%
{\catcode`\^^M=13 %local scope
\gdef\crw{\boxit{\usersize\setbox0=%
  \hbox to\csize{\vrule\hss\vrule%
  height.8\csize depth.2\csize width%
  \csize\hss\vrule}%
\hrule\ea\fifol\data\lofif^^M}}
\gdef\sol{\boxit{\def\num{}\puzzlefalse%
\usersize\setbox0=\hbox to\csize{\vrule%
  \hss\vrule height.8\csize depth%
  .2\csize width\csize\hss\vrule}%
\hrule\ea\fifol\data\lofif^^M}}
\gdef\fifol#1^^M{\ifx\lofif#1\lofif\fi%
\processl{#1}\fifol}}%end local scope
%
\def\lofif#1\fifol{\fi}
\def\processl#1{\hbox{\fifo#1\ofif}\hrule}
\def\fifo#1{\ifx\ofif#1\ofif\fi%
\process#1\fifo}    \def\ofif#1\fifo{\fi}
%
\def\process#1{\if*#1\copy0\relax\else%
\ifx\relax#1\copy0\relax\else\ifnum`#1=
        \uccode`#1\cap#1\else\low#1\fi%
\fi\fi}
\def\low#1{\hbox to\csize{\vrule
height.8\csize depth.2\csize\relax%
\ifpuzzle\null\else\hss\uppercase{#1}\fi%
\hss\vrule}}
\def\cap#1{\hbox to\csize{\vrule
height.8\csize depth.2\csize\relax%
\num\ifpuzzle\null\else\hss#1\fi%
\hss\vrule}}
%
\def\num{\global\advance\cnt1\relax%
\vbox to.8\csize{\rlap{\kern1pt%
\fiverm\the\cnt\hss}\vfil}}
%
\def\boxit#1{\vbox{\hrule\hbox{\vrule%
\vbox{#1}\vrule}\hrule}}%
%\endinput %end macros %cgl@risc1.rug.nl
