local function printspiral(n) local function z(x,y) local m = math.min(x, y, n-1-x, n-1-y) return x