a[9];char*p;main(c,v){for(;p=gets(a);puts(" 1"+1/c*2))for(c=0;v=*p/32;c=v)printf(" 1 %c"+(v*c<2|v>2)+(c<2|v%2)*2,*p++);}