m=math.abs w=' 'n="*n"while""do a,b,c,d=io.read(n,n,n,n)while(c>0)or(d>0)do print(a..w..b..w..c..w..d)a,b,c,d=m(a-b),m(b-c),m(d-c),m(a-d)end print"0 0 0 0\n"end