\def\f@rst#1#2{#1}
\ifx\c@lst\undefined\newcounter{lst}\fi
\renewenvironment{enumerate}%
{\begin{list}{\arabic{lst}.}{\usecounter{lst}\setlength{\itemsep}{0cm}%
\setlength{\parsep}{0cm}\setlength{\topsep}{2mm}\item[]}}{\end{list}}

\def\ref#1{\expandafter\@setref\csname r@#1\endcsname\f@rst#1}
\newcounter{qwest}
\def\theqwest{\arabic{qwest}}

\newcount\total
\total=0
\newcount\nmbr
\newcount\inmbr
\newenvironment{q}[1]{\item  #1
\begin{list}{\asbuk{qwest})}{\usecounter{qwest}}}{\end{list}\par}
\def\good{\label{q\arabic{lst}}\global\advance\total by1}

\newcount\cone
\newcount\ctwo
\newcount\cthree

\def\l@@n@{&}

\def\l@n@{\ifnum\cone<\ctwo\gdef\c@ll{\number\cone}\else\gdef\c@ll{\bf X}\fi
\global\advance\cone by1\global\advance\cthree by1
\l@@n@\hbox to 1cm{\hfil\c@ll\hfil}
\ifnum\cthree<10\l@n@\fi}

\def\bl@nk{\hbox to 2.5cm{\hfil �)\hfil}&&&&&&&&&&\\\hline
\hbox to 2.5cm{\hfil �)\hfil}&&&&&&&&&&\\\hline
\hbox to 2.5cm{\hfil �)\hfil}&&&&&&&&&&\\\hline
\hbox to 2.5cm{\hfil �)\hfil}&&&&&&&&&&\\\hline\hline}

\def\markX{\hbox to 1cm{\hfil\bf X\hfil}}
%\def\markX{\hbox to 1cm{\leaders\hbox to 5pt{\bf X\hss}\hfill}}
\def\@@one{\markX\\\hline\\\hline\\\hline\\}
\def\@@two{\\\hline\markX\\\hline\\\hline\\}
\def\@@three{\\\hline\\\hline\markX\\\hline\\}
\def\@@four{\\\hline\\\hline\\\hline\markX\\}
\def\the@ns#1{\hbox to 1cm{\begin{tabular}{|c}\ifcase#1\null\or\@@one\or
\@@two\or\@@three\or\@@four\fi
\end{tabular}}}

\def\l@@@{\ifnum\cone<\ctwo\gdef\c@ll{\the@ns{\ref{q\number\cone}}}\else\gdef\c@ll{}\fi
\global\advance\cone by1\global\advance\cthree by1
\l@@n@\c@ll\ifnum\cthree<10\l@@@\fi}


\def\@@tru{\global\advance\cone by-10
\global\cthree=0\hbox to 2.5cm{\begin{tabular}{|c}
\hbox to 2.5cm{\hfil �)\hfil}\\\hline
\hbox to 2.5cm{\hfil �)\hfil}\\\hline
\hbox to 2.5cm{\hfil �)\hfil}\\\hline
\hbox to 2.5cm{\hfil �)\hfil}
\end{tabular}}\l@@@\\\hline\hline}

\def\@@tmp{\ifnum\cone<\ctwo\global\cthree=0
\l@n@\\\hline\bl@nk\@@tmp\fi}

\def\showtbl{{\tabcolsep=0pt\global\ctwo=\total\global\cone=0
\m@keh@ader\@@tmp\m@kefoot@r}}

\def\m@keh@ader{\begin{center}\begin{tabular}{||c|c|c|c|c|c|c|c|c|c|c||}\hline\hline
���.~������&\multicolumn{10}{|c||}{����� �������}\\\hline}

\def\m@kefoot@r{\end{tabular}\end{center}}

\def\trueans{{\tabcolsep=0pt\global\ctwo=\total\global\cone=0
\m@keh@ader\gdef\bl@nk{\@@tru}\@@tmp\m@kefoot@r}}
