Write decimal numbers shown in grids