#include<stdio.h>
#include<stdlib.h>
int main()
{
int i,j,k;
int n1,n2,n3;
int ***arr = NULL;
scanf("%d %d %d",&n1,&n2,&n3);
arr = (int ***)calloc(n1,sizeof(int **));
for(i = 0;i < n1;i++)
{
arr[i] = (int **)calloc(n2,sizeof(int*));
for(j = 0;j < n2;j++)
{
arr[i][j] = (int*)calloc(n3,sizeof(int));
for(k = 0;k<n3;k++)
{
arr[i][j][k] = i+j+k+1;
printf("%d ",arr[i][j][k]);
}
}
}
for(i=0;i<n1;i++)
{
for(j=0;j<n2;j++)
{
free(array[i][j]);//释放第三维指针
}
}
for(i=0;i<n1;i++)
{
free(array[i]);//释放第二维指针
}
free(array);//释放第一维指针
}