#include "stdio.h"main(){int a,b[4],i=0;scanf("%d",&a);b[0]=a/1000;b[1]=a/100%10;b[2]=a%100/10;b[3]=a%100%10;for(;i<4;i++){printf("%d",b[i]);printf(" ");}}