Assigning the elements in a 3d array

In reply to rag123:

Say for array [1] [0] [1] where i is odd, j is even and k is odd, I want 121 to be printed in that index and hence the pattern follows.

I understood the unique constraint and removed it. Then too i didn’t get the output as I wanted.