#include <iostream>
using namespace std;
int main(){
int n,n0,nr_cifre=0,i,j,a[100][100];
cout<<"Introduceti numarul:";
cin>>n;
n0=n;
while(n0>0){
nr_cifre++;
n0=n0/10;
}
for(j=0;j<nr_cifre;j++){
for(i=0;i<nr_cifre;i++){
a[i][j]=n%10;
}
n=n/10;
}
for(i=0;i<nr_cifre;i++){
for(j=0;j<nr_cifre;j++){
cout<<a[i][j]<<" ";
}
cout<<endl;
}
return 0;
}