\documentclass[tikz,border=5pt]{standalone}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz-cd}
\usetikzlibrary{graphs}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{shapes.geometric}
\usepackage{latexsym,amsfonts, amsthm}
\begin{document}
\begin{tikzpicture}[scale=0.9, every node/.style={transform shape}]
\fill (0,4) circle (2pt) ;
\fill (0,1) circle (2pt) ;
\fill (0,2) circle (2pt) ;
\fill (0,3) circle (2pt) ;
\fill (1,4) circle (2pt) ;
\fill (1,1) circle (2pt) ;
\fill (1,2) circle (2pt) ;
\fill (1,3) circle (2pt) ;
\fill (2,4) circle (2pt) ;
\fill (2,1) circle (2pt) ;
\fill (2,2) circle (2pt) ;
\fill (2,3) circle (2pt) ;
\fill (3,4) circle (2pt) ;
\fill (3,1) circle (2pt) ;
\fill (3,2) circle (2pt) ;
\fill (3,3) circle (2pt) ;
\fill (4,3) circle (2pt) ;
\fill (4,1) circle (2pt) ;
\fill (4,2) circle (2pt) ;
\fill (5,3) circle (2pt) ;
\fill (5,1) circle (2pt) ;
\fill (5,2) circle (2pt) ;
\fill (6,3) circle (2pt) ;
\fill (6,1) circle (2pt) ;
\fill (6,2) circle (2pt) ;
\draw (0,1) -- (0,4) -- (1,4) -- (1,1) -- (2,1) -- (2,4) -- (3,4) -- (3,1)
-- (4,1) -- (4,3) -- (5,3) -- (5,1) -- (6,1) -- (6,3) ;
\node at (-0.3, 1.2) {\tiny 0} ;
\node at (-0.3, 2.2) {\tiny 7} ;
\node at (-0.3, 3.2) {\tiny 14} ;
\node at (-0.3, 4.2) {\tiny 21} ;
\node at (0.7, 1.2) {\tiny 1} ;
\node at (0.7, 2.2) {\tiny 8} ;
\node at (0.7, 3.2) {\tiny 15} ;
\node at (0.7, 4.2) {\tiny 22} ;
\node at (1.7, 1.2) {\tiny 2} ;
\node at (1.7, 2.2) {\tiny 9} ;
\node at (1.7, 3.2) {\tiny 16} ;
\node at (1.7, 4.2) {\tiny 23} ;
\node at (2.7, 1.2) {\tiny 3} ;
\node at (2.7, 2.2) {\tiny 10} ;
\node at (2.7, 3.2) {\tiny 17} ;
\node at (2.7, 4.2) {\tiny 24} ;
\node at (3.7, 1.2) {\tiny 4} ;
\node at (3.7, 2.2) {\tiny 11} ;
\node at (3.7, 3.2) {\tiny 18} ;
\node at (4.7, 1.2) {\tiny 5} ;
\node at (4.7, 2.2) {\tiny 12} ;
\node at (4.7, 3.2) {\tiny 19} ;
\node at (5.7, 1.2) {\tiny 6} ;
\node at (5.7, 2.2) {\tiny 13} ;
\node at (5.7, 3.2) {\tiny 20} ;
\fill (8,1) circle (2pt) ;
\fill (8,2) circle (2pt) ;
\fill (8,3) circle (2pt) ;
\fill (8,4) circle (2pt) ;
\fill (9,1) circle (2pt) ;
\fill (9,2) circle (2pt) ;
\fill (9,3) circle (2pt) ;
\fill (9,4) circle (2pt) ;
\fill (10,1) circle (2pt) ;
\fill (10,2) circle (2pt) ;
\fill (10,3) circle (2pt) ;
\fill (10,4) circle (2pt) ;
\fill (11,1) circle (2pt) ;
\fill (11,2) circle (2pt) ;
\fill (11,3) circle (2pt) ;
\fill (11,4) circle (2pt) ;
\fill (12,1) circle (2pt) ;
\fill (12,2) circle (2pt) ;
\fill (12,3) circle (2pt) ;
\fill (12,4) circle (2pt) ;
\fill (13,1) circle (2pt) ;
\fill (13,2) circle (2pt) ;
\fill (13,3) circle (2pt) ;
\fill (13,4) circle (2pt) ;
\fill (14,0) circle (2pt) ;
\fill (14,1) circle (2pt) ;
\fill (14,2) circle (2pt) ;
\fill (14,3) circle (2pt) ;
\draw (14,0) -- (14,3) -- (13,3) -- (13,1) -- (12,1) -- (12,3) -- (13,4) -- (11,4) -- (11,1) -- (9,1)
-- (10,2) -- (10,4) -- (9,4) -- (9,2) -- (8,1) -- (8,4) ;
\node at (13.7, 0.2) {\tiny 0} ;
\node at (13.7, 1.2) {\tiny 7} ;
\node at (13.7, 2.2) {\tiny 14} ;
\node at (13.7, 3.2) {\tiny 21} ;
\node at (7.7, 1.2) {\tiny 1} ;
\node at (7.7, 2.2) {\tiny 8} ;
\node at (7.7, 3.2) {\tiny 15} ;
\node at (7.7, 4.2) {\tiny 22} ;
\node at (8.7, 1.2) {\tiny 2} ;
\node at (8.7, 2.2) {\tiny 9} ;
\node at (8.7, 3.2) {\tiny 16} ;
\node at (8.7, 4.2) {\tiny 23} ;
\node at (9.7, 1.2) {\tiny 3} ;
\node at (9.7, 2.2) {\tiny 10} ;
\node at (9.7, 3.2) {\tiny 17} ;
\node at (9.7, 4.2) {\tiny 24} ;
\node at (10.7, 1.2) {\tiny 4} ;
\node at (10.7, 2.2) {\tiny 11} ;
\node at (10.7, 3.2) {\tiny 18} ;
\node at (10.7, 4.2) {\tiny 25} ;
\node at (11.7, 1.2) {\tiny 5} ;
\node at (11.7, 2.2) {\tiny 12} ;
\node at (11.7, 3.2) {\tiny 19} ;
\node at (11.7, 4.2) {\tiny 26} ;
\node at (12.7, 1.2) {\tiny 6} ;
\node at (12.7, 2.2) {\tiny 13} ;
\node at (12.7, 3.2) {\tiny 20} ;
\node at (12.7, 4.2) {\tiny 27} ;
\end{tikzpicture}
\end{document}