local a, b, e = io.read("*n", "*n", "*n")
local r = e * 3
local c = r - a - b
local g, h, i = r - e - c, r - e - b, r - e - a
local d, f = r - a - g, r - c - i
print(a .." " .. b .. " " .. c)
print(d .." " .. e .. " " .. f)
print(g .." " .. h .. " " .. i)
