a=matrix(scan("stdin"),4) for(x in 1:30){write(v<-a[,x],"");while(sum(v)>0)write(v<-abs(v-c(v[-1],v[1])),"");cat(" ")}