how can i do this

Code:

#include <stdio.h>
#include <stdlib.h>
int main()
{
int test[3][3][9] = { 0 };
for ( int i = 0; i < 3; i++ )
for ( int j = 0; j < 3; j++ )
for ( int z = 0; z < 9; z++ )
test[i][j][z] = z + 1;
int counter = 1;
for ( int i = 0; i < 3; i++ )
for ( int j = 0; j < 3; j++ )
{
test[i][j] = counter;
counter++;
}
for ( int i = 0; i < 3; i++ )
for ( int j = 0; j < 3; j++ )
{
for ( int z = 0; z < 9; z++ )
printf("i = %d j = %d z = %d element = %d\n", i, j, z, test[i][j][z]);
putchar('\n');
}
return 0;
}

i need to make a suduko grid im trying to put the solved squares in co-ordinates i and j and the possible values in z