\documentclass{standalone}
\usepackage[polish]{babel}
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage{tikz}


\begin{document}

\begin{tikzpicture}
\draw[step=5mm,draw=gray!50,very thin] (0,0) grid (8,8);
\foreach \i in {0,...,8} \node[below] at (\i, 0) {\i};
\foreach \i in {1,...,8} \node[left] at (0, \i) {\i};

% ... polecenia
\end{tikzpicture}

\end{document}