This is an interactive problem

You are given a grid n× n, where n is odd. Rows are enumerated from 1 to n from up to down, columns are enumerated from 1 to n from left to right. Cell, standing on the intersection of row x and column y, is denoted by (x, y).

Every cell contains 0 or 1. It is known that the top-left cell contains 1, and the bottom-right cell contains 0.

We want to know numbers in all cells of the grid. To do so we can ask the following questions: 

"? x_1 y_1 x_2 y_2", where 1 ≤ x_1 ≤ x_2 ≤ n, 1 ≤ y_1 ≤ y_2 ≤ n, and x_1 + y_1 + 2 ≤ x_2 + y_2. In other words, we output two different cells (x_1, y_1), (x_2, y_2) of the grid such that we can get from the first to the second by moving only to the right and down, and they aren't adjacent.

As a response to such question you will be told if there exists a path between (x_1, y_1) and (x_2, y_2), going only to the right or down, numbers in cells of which form a palindrome.

For example, paths, shown in green, are palindromic, so answer for "? 1 1 2 3" and "? 1 2 3 3" would be that there exists such path. However, there is no palindromic path between (1, 1) and (3, 1).

<image>

Determine all cells of the grid by asking not more than n^2 questions. It can be shown that the answer always exists.

Input

The first line contains odd integer (3 ≤ n < 50) — the side of the grid.

Interaction

You begin the interaction by reading n.

To ask a question about cells (x_1, y_1), (x_2, y_2), in a separate line output "? x_1 y_1 x_2 y_2".

Numbers in the query have to satisfy 1 ≤ x_1 ≤ x_2 ≤ n, 1 ≤ y_1 ≤ y_2 ≤ n, and x_1 + y_1 + 2 ≤ x_2 + y_2. Don't forget to 'flush', to get the answer.

In response, you will receive 1, if there exists a path going from (x_1, y_1) to (x_2, y_2) only to the right or down, numbers in cells of which form a palindrome, and 0 otherwise.

In case your query is invalid or you asked more than n^2 queries, program will print -1 and will finish interaction. You will receive Wrong answer verdict. Make sure to exit immediately to avoid getting other verdicts.

When you determine numbers in all cells, output "!".

Then output n lines, the i-th of which is a string of length n, corresponding to numbers in the i-th row of the grid.

After printing a query do not forget to output end of line and flush the output. Otherwise, you will get Idleness limit exceeded. To do this, use:

  * fflush(stdout) or cout.flush() in C++;
  * System.out.flush() in Java;
  * flush(output) in Pascal;
  * stdout.flush() in Python;
  * see documentation for other languages.



Hack Format

To hack, use the following format.

The first line should contain a single odd integer n (side of your grid).

The i-th of n following lines should contain a string of length n corresponding to the i-th row of the grid. Top left element of the grid has to be equal to 1, bottom right has to be equal to 0.

Example

Input


3
0
1
0
1
1
1
1

Output


? 1 1 1 3
? 1 1 2 3
? 2 1 2 3
? 3 1 3 3
? 2 2 3 3
? 1 2 3 2
? 1 2 3 3
!
100
001
000

Source: codeforces | Difficulty: VERY_HARD
Tags: Implementation


Solutions:
n = int(input())
a = []
for i in range(0, n + 1):
	temp = [0] * (n + 1)
	a.append(temp)
a[1][1] = 1

def ask(x1, y1, x2, y2):
	print('?', x1, y1, x2, y2)
	a = int(input())
	if a:
		return True
	else:
		False
for i in range(3, n + 1, 1):
	a[1][i] = a[1][i - 2] ^ (not ask(1, i - 2, 1, i))
for i in range(2, n + 1):
	for j in range(n, 0, -1):
		if i == n and j == n:
			a[i][j] = 0
			continue
		if j >= 2:
			a[i][j] = a[i - 1][j - 1] ^ (not ask(i - 1, j - 1, i, j))
		else:
			a[i][j] = a[i][j + 2] ^ (not ask(i, j, i, j + 2))
ed = 0
for i in range(1, n - 1, 2):
	if a[i][i] == 1 and a[i + 2][i + 2] == 0:
		if ask(i, i + 1, i + 2, i + 2):
			ed = a[i][i + 1]
		elif ask(i, i, i + 1, i + 2):
			ed = a[i + 1][i + 2] ^ 1
		elif a[i][i + 1] == a[i + 1][i + 2]:
			ed = a[i][i + 1] ^ a[i][i + 2] ^ 1
		else:
			ed = a[i][i + 1] ^ 1
		break
print('!')
for i in range(1, n + 1):
	for j in range(1, n + 1):
		if (i + j) % 2 != 0:
			a[i][j] ^= ed
		print(a[i][j], end='')
	print('')


import sys

def query(x1, y1, x2, y2):
	print('? {} {} {} {}'.format(x1 + 1, y1 + 1, x2 + 1, y2 + 1))
	sys.stdout.flush()
	result = int(sys.stdin.readline())
	return result ^ 1

def replace(mat, n, x0, x):
	for i in range(n):
		for j in range(n):
			if mat[i][j] == x0:
				mat[i][j] = x
n = int(sys.stdin.readline())
mat = [[None] * n for _ in range(n)]
mat[0][0] = 1
mat[0][1] = 3
mat[1][2] = query(0, 1, 1, 2) ^ mat[0][1]
mat[1][0] = query(1, 0, 1, 2) ^ mat[1][2]
mat[1][1] = query(0, 0, 1, 1) ^ mat[0][0]
mat[n - 1][n - 1] = 0
for i in range(0, n):
	for j in range(0, n):
		if mat[i][j] is None:
			if i < 2:
				mat[i][j] = query(i, j - 2, i, j) ^ mat[i][j - 2]
			else:
				mat[i][j] = query(i - 2, j, i, j) ^ mat[i - 2][j]
p = []
pos = []
for i in range(n):
	p.append(mat[i][0])
	pos.append((i, 0))
for i in range(1, n):
	p.append(mat[n - 1][i])
	pos.append((n - 1, i))
for i in range(n * 2 - 4):
	(x0, y0, x1, y1) = range(i, i + 4)
	if p[x0] == p[x1] and p[y0] == p[y1]:
		r = query(pos[x0][0], pos[x0][1], pos[y1][0], pos[y1][1])
		if i % 2 == 0:
			replace(mat, n, p[y0], p[x0] ^ r)
			replace(mat, n, p[y0] ^ 1, p[x0] ^ r ^ 1)
		else:
			replace(mat, n, p[x0], p[y0] ^ r)
			replace(mat, n, p[x0] ^ 1, p[y0] ^ r ^ 1)
		break
	if p[x0] != p[x1] and p[y0] != p[y1]:
		r = query(pos[x0][0], pos[x0][1], pos[y1][0], pos[y1][1])
		if i % 2 == 0:
			replace(mat, n, p[y0], p[x0] ^ r ^ 1)
			replace(mat, n, p[y0] ^ 1, p[x0] ^ r)
		else:
			replace(mat, n, p[x0], p[y0] ^ r ^ 1)
			replace(mat, n, p[x0] ^ 1, p[y0] ^ r)
		break
s = '!\n'
for i in range(n):
	for j in range(n):
		s += str(mat[i][j])
	s += '\n'
print(s)


import math
import sys
DEBUG = False

def inp():
	return sys.stdin.readline().rstrip()

def dprint(*value, sep=' ', end='\n'):
	if DEBUG:
		print(*value, sep=sep, end=end)

def readi():
	n = int(inp())
	dprint('read', n)
	if n == -1:
		sys.exit()
	return n

def ask(a, b, c, d):
	dprint('ask', a, b, c, d)
	a += 1
	b += 1
	c += 1
	d += 1
	print('?', a, b, c, d, flush=True)
	return readi()

def answer(M):
	dprint('ans', M)
	print('!')
	for m in M:
		print(*m, sep='')
	sys.stdout.flush()

def posif(x):
	if x >= 2:
		return x - 2
	return x

def negaf(x):
	if x >= 2:
		return 1 - (x - 2)
	return x

def main():
	N = readi()
	M = [[-1] * N for _ in range(N)]
	M[0][0] = 1
	M[N - 1][N - 1] = 0
	for y in range(0, N, 2):
		for x in range(0, N, 2):
			if (y, x) in ((0, 0), (N - 1, N - 1)):
				continue
			if x > 1:
				if ask(y, x - 2, y, x):
					M[y][x] = M[y][x - 2]
				else:
					M[y][x] = 1 - M[y][x - 2]
			elif ask(y - 2, x, y, x):
				M[y][x] = M[y - 2][x]
			else:
				M[y][x] = 1 - M[y - 2][x]
	for y in range(1, N, 2):
		for x in range(1, N, 2):
			if ask(y, x, y + 1, x + 1):
				M[y][x] = M[y + 1][x + 1]
			else:
				M[y][x] = 1 - M[y + 1][x + 1]
	M[0][1] = 0
	for y in range(0, N, 2):
		for x in range(1, N, 2):
			if (y, x) == (0, 1):
				continue
			if x > 1:
				if ask(y, x - 2, y, x):
					M[y][x] = M[y][x - 2]
				else:
					M[y][x] = 1 - M[y][x - 2]
			elif ask(y - 2, x, y, x):
				M[y][x] = M[y - 2][x]
			else:
				M[y][x] = 1 - M[y - 2][x]
	for y in range(1, N, 2):
		for x in range(0, N, 2):
			if x > 0:
				if ask(y - 1, x - 1, y, x):
					M[y][x] = M[y - 1][x - 1]
				else:
					M[y][x] = 1 - M[y - 1][x - 1]
			elif ask(y, x, y + 1, x + 1):
				M[y][x] = M[y + 1][x + 1]
			else:
				M[y][x] = 1 - M[y + 1][x + 1]
	for y in range(N):
		for x in range(N):
			if (x + y) % 2 == 1:
				M[y][x] += 2
	dprint(M)
	D = [(0, 3), (1, 2), (2, 1), (3, 0)]
	for iy in range(N):
		for ix in range(N):
			for (dy, dx) in D:
				jy = iy + dy
				jx = ix + dx
				if jy >= N or jx >= N:
					continue
				paths = calc_paths(iy, ix, jy, jx)
				vals = [[M[y][x] for (y, x) in path] for path in paths]
				posi = [list(map(posif, val)) for val in vals]
				nega = [list(map(negaf, val)) for val in vals]
				ep = any([li == list(reversed(li)) for li in posi])
				en = any([li == list(reversed(li)) for li in nega])
				if ep == en:
					continue
				res = bool(ask(iy, ix, jy, jx))
				fn = posif if res == ep else negaf
				for y in range(N):
					for x in range(N):
						if (x + y) % 2 == 1:
							M[y][x] = fn(M[y][x])
				answer(M)
				return
	assert False

def calc_paths(iy, ix, jy, jx):
	paths = []
	path = []

	def rec(y, x):
		path.append((y, x))
		if (y, x) == (jy, jx):
			paths.append(tuple(path))
		else:
			for (dy, dx) in [(0, 1), (1, 0)]:
				ny = y + dy
				nx = x + dx
				if ny > jy or nx > jx:
					continue
				rec(ny, nx)
		path.pop()
	rec(iy, ix)
	return paths
main()


from sys import stdout
from itertools import product

def solve():
	global n, grid, query
	n = int(input())
	grid = [['*'] * n for _ in range(n)]
	grid[0][0] = '1'
	grid[n - 1][n - 1] = '0'

	def print_grid():
		for i in range(n):
			print(''.join(grid[i]))

	def query(i, j, k, l):
		print('? %d %d %d %d' % (i + 1, j + 1, k + 1, l + 1))
		stdout.flush()
		return int(input()) == 1

	def derive_value(i, j, k, l):
		if grid[k][l] != '*':
			return
		if i < k or j < l:
			q = query(i, j, k, l)
		else:
			q = query(k, l, i, j)
		if q:
			grid[k][l] = grid[i][j]
		else:
			grid[k][l] = '1' if grid[i][j] == '0' else '0'
	for i in range(0, n - 2, 2):
		derive_value(i, 0, i + 2, 0)
	for (i, j) in product(range(0, n, 2), range(0, n - 2, 2)):
		derive_value(i, j, i, j + 2)
	for (i, j) in product(range(0, n - 2, 2), range(0, n - 2, 2)):
		derive_value(i, j, i + 1, j + 1)
	for i in range(0, n - 2, 2):
		if grid[i + 2][i + 2] == '0':
			if query(i, i, i + 1, i + 2):
				grid[i + 1][i + 2] = '1'
				l = i + 1
				m = i + 2
			elif grid[i][i + 2] != grid[i + 1][i + 1]:
				grid[i + 1][i + 2] = '0'
				l = i + 1
				m = i + 2
			elif query(i, i + 1, i + 2, i + 2):
				grid[i][i + 1] = '0'
				l = i
				m = i + 1
			elif grid[i + 1][i + 1] == '1':
				grid[i + 1][i + 2] = '0'
				l = i + 1
				m = i + 2
			else:
				grid[i][i + 1] = '1'
				l = i
				m = i + 1
			break
	for j in range(m - 2, -1, -2):
		derive_value(l, j + 2, l, j)
	for j in range(m, n - 2, 2):
		derive_value(l, j, l, j + 2)
	for i in range(l - 2, -1, -2):
		derive_value(i + 2, m % 2, i, m % 2)
	for i in range(l, n - 2, 2):
		derive_value(i, m % 2, i + 2, m % 2)
	derive_value(l % 2, m % 2, l % 2 + 1, m % 2 + 1)
	if l % 2 == 1:
		derive_value(l % 2 + 1, m % 2 + 1, l % 2 - 1, m % 2 + 1)
	else:
		derive_value(l % 2 + 1, m % 2 + 1, l % 2 + 1, m % 2 - 1)
	for j in range(1, n - 3, 2):
		derive_value(0, j, 0, j + 2)
	for j in range(0, n - 2, 2):
		derive_value(1, j, 1, j + 2)
	for (i, j) in product(range(0, n - 2), range(0, n)):
		derive_value(i, j, i + 2, j)
	print('!')
	print_grid()
solve()


from sys import stdout

def full(k, get, mass):
	global l
	if k % 2 == 1:
		k = k
	else:
		k = k - 1
	if k - 4 >= 0:
		for i in range(l)[k - 4::-2]:
			answer = ask(get(i), get(i + 2))
			if answer:
				mass[i] = mass[i + 2]
			else:
				mass[i] = not mass[i + 2]
	if k + 2 < 2 * n - 1:
		for i in range(l)[k + 2::2]:
			answer = ask(get(i - 2), get(i))
			if answer:
				mass[i] = mass[i - 2]
			else:
				mass[i] = not mass[i - 2]

def ask(x, y):
	x = [x[1], x[0]]
	y = [y[1], y[0]]
	q = f'? {x[0] + 1} {x[1] + 1} {y[0] + 1} {y[1] + 1}'
	print(q)
	stdout.flush()
	answer = bool(int(input()))
	return answer

def get_top(idx):
	if idx >= n:
		i = n - 1
		j = idx % n + 1
	else:
		i = idx % n
		j = 0
	return (i, j)

def get_bot(idx):
	if idx >= n:
		j = n - 1
		i = idx % n + 1
	else:
		j = idx % n
		i = 0
	return (i, j)

def fun(mass, f):
	l = len(mass)
	get = f
	for i in range(l)[2:l - 1:2]:
		answer = ask(get(i - 2), get(i))
		if answer:
			mass[i] = mass[i - 2]
		else:
			mass[i] = not mass[i - 2]
	for i in range(l)[4::2]:
		if mass[i - 4] == mass[i - 2] and mass[i - 2] != mass[i]:
			answer = ask(get(i - 3), get(i - 1))
			if answer:
				answer = ask(get(i - 4), get(i - 1))
				if answer:
					mass[i - 3] = mass[i - 4]
					mass[i - 1] = mass[i - 4]
				else:
					mass[i - 3] = not mass[i - 4]
					mass[i - 1] = not mass[i - 4]
				full(i - 1, get, mass)
			else:
				answer = ask(get(i - 3), get(i))
				if answer:
					mass[i - 3] = mass[i]
					mass[i - 1] = mass[i - 2]
				else:
					mass[i - 3] = not mass[i]
					mass[i - 1] = not mass[i - 2]
				full(i, get, mass)
			break
		elif mass[i - 4] != mass[i - 2] and mass[i - 2] == mass[i]:
			answer = ask(get(i - 3), get(i - 1))
			if answer:
				answer = ask(get(i - 3), get(i))
				if answer:
					mass[i - 3] = mass[i]
					mass[i - 1] = mass[i]
				else:
					mass[i - 3] = not mass[i]
					mass[i - 1] = not mass[i]
				full(i, get, mass)
			else:
				answer = ask(get(i - 4), get(i - 1))
				if answer:
					mass[i - 3] = mass[i - 2]
					mass[i - 1] = mass[i - 4]
				else:
					mass[i - 3] = not mass[i - 2]
					mass[i - 1] = not mass[i - 4]
				full(i - 1, get, mass)
			break
n = int(input())
a_top = [None] * (2 * n - 1)
a_top[0] = True
a_top[len(a_top) - 1] = False
a_bot = a_top.copy()
l = len(a_bot)
fun(a_top, get_top)
fun(a_bot, get_bot)
matrix = []
for i in range(n):
	matrix.append([None] * n)
for i in range(len(a_top)):
	idx = get_top(i)[::-1]
	matrix[idx[0]][idx[1]] = a_top[i]
	idx = get_bot(i)[::-1]
	matrix[idx[0]][idx[1]] = a_bot[i]
for i in range(n)[1:n - 1:1]:
	for j in range(n)[1:n - 1:1]:
		answer = ask([j - 1, i - 1], [j, i])
		if answer:
			matrix[i][j] = matrix[i - 1][j - 1]
		else:
			matrix[i][j] = not matrix[i - 1][j - 1]
print('!')
for i in matrix:
	for j in i:
		print(int(j), end='')
	print()
stdout.flush()


n = int(input())
a = []
for i in range(0, n + 1):
	t = [0] * (n + 1)
	a.append(t)
a[1][1] = 1

def w(x1, y1, x2, y2):
	print('?', x1, y1, x2, y2)
	a = int(input())
	if a:
		return True
	else:
		False
for i in range(3, n + 1, 1):
	a[1][i] = a[1][i - 2] ^ (not w(1, i - 2, 1, i))
for i in range(2, n + 1):
	for j in range(n, 0, -1):
		if i == n and j == n:
			a[i][j] = 0
			continue
		if j >= 2:
			a[i][j] = a[i - 1][j - 1] ^ (not w(i - 1, j - 1, i, j))
		else:
			a[i][j] = a[i][j + 2] ^ (not w(i, j, i, j + 2))
e = 0
for i in range(1, n - 1, 2):
	if a[i][i] == 1 and a[i + 2][i + 2] == 0:
		if w(i, i + 1, i + 2, i + 2):
			e = a[i][i + 1]
		elif w(i, i, i + 1, i + 2):
			e = a[i + 1][i + 2] ^ 1
		elif a[i][i + 1] == a[i + 1][i + 2]:
			e = a[i][i + 1] ^ a[i][i + 2] ^ 1
		else:
			e = a[i][i + 1] ^ 1
		break
print('!')
for i in range(1, n + 1):
	for j in range(1, n + 1):
		if (i + j) % 2 != 0:
			a[i][j] ^= e
		print(a[i][j], end='')
	print('')


from sys import stdout

def query(mat, x, y, p, q):
	if not (x <= p and y <= q and (x + y + 2 < p + q)):
		return None
	if mat[x][y] != mat[p][q]:
		return False
	if x + 1 == p and y + 2 == q:
		return mat[x][y + 1] == mat[x][y + 2] or mat[x + 1][y] == mat[x + 1][y + 1] or mat[x][y + 1] == mat[x + 1][y + 1]
	if x + 2 == p and y + 1 == q:
		return mat[x][y + 1] == mat[x + 1][y + 1] or mat[x + 1][y] == mat[x + 2][y] or mat[x + 1][y] == mat[x + 1][y + 1]
	if x + 2 == p and y + 2 == q:
		s1 = {mat[x][y + 1], mat[x + 1][y]}
		s2 = {mat[x + 1][y + 2], mat[x + 2][y + 1]}
		return bool(s1 & s2)
	return None
n = int(input())
a = []
for _ in range(n):
	a.append([None] * n)
a[0][0] = 1
a[0][1] = 0
a[n - 1][n - 1] = 0

def interactive(x, y, p, q):
	print('?', x + 1, y + 1, p + 1, q + 1)
	stdout.flush()
	res = int(input())
	if x + y + 2 == p + q:
		if a[p][q] is None:
			a[p][q] = a[x][y] ^ res ^ 1
		else:
			a[x][y] = a[p][q] ^ res ^ 1
	return res

def confirm(mat):
	print('!')
	for row in mat:
		print(''.join(map(str, row)))
	stdout.flush()
	exit(0)
interactive(0, 1, 1, 2)
interactive(1, 0, 1, 2)
for i in range(0, n):
	for j in range(0, n):
		if a[i][j] is not None:
			continue
		if j == 0:
			interactive(i - 2, j, i, j)
			continue
		if i == 0:
			interactive(i, j - 2, i, j)
			continue
		interactive(i - 1, j - 1, i, j)
b = []
for i in range(n):
	b.append([0] * n)
	for j in range(n):
		b[i][j] = a[i][j] if (i + j) % 2 == 0 else a[i][j] ^ 1
f1 = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]
f2 = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]
for stx in range(0, n - 2, 2):
	for sty in range(0, n - 2, 2):
		for i in range(3):
			for j in range(3):
				f1[i][j] = a[i + stx][j + sty]
				f2[i][j] = b[i + stx][j + sty]
		for i in range(3):
			for j in range(3):
				for k in range(3):
					for l in range(3):
						res1 = query(f1, i, j, k, l)
						res2 = query(f2, i, j, k, l)
						if res1 != res2:
							res = interactive(i + stx, j + sty, k + stx, l + sty)
							confirm(a if res == res1 else b)


import math
import sys
n = int(input())
arr = [[-1 for x in range(n + 1)] for y in range(n + 1)]
arr[1][1] = 1
arr[n][n] = 0

def flipEven(arr):
	for i in range(1, n + 1):
		for j in range(1, n + 1):
			if abs(j - i) % 2 == 1:
				arr[i][j] = 1 - arr[i][j]
	return arr
for i in range(1, n + 1):
	for j in range(1, n + 1):
		if (j - i) % 2 == 0 and (i != 1 or j != 1) and (i != n or j != n):
			if j == 1:
				print('? ' + str(i - 2) + ' ' + str(j) + ' ' + str(i) + ' ' + str(j))
				sys.stdout.flush()
				if int(input()) == 1:
					arr[i][j] = arr[i - 2][j]
				else:
					arr[i][j] = 1 - arr[i - 2][j]
			elif i == 1:
				print('? ' + str(i) + ' ' + str(j - 2) + ' ' + str(i) + ' ' + str(j))
				sys.stdout.flush()
				if int(input()) == 1:
					arr[i][j] = arr[i][j - 2]
				else:
					arr[i][j] = 1 - arr[i][j - 2]
			else:
				print('? ' + str(i - 1) + ' ' + str(j - 1) + ' ' + str(i) + ' ' + str(j))
				sys.stdout.flush()
				if int(input()) == 1:
					arr[i][j] = arr[i - 1][j - 1]
				else:
					arr[i][j] = 1 - arr[i - 1][j - 1]
arr[1][2] = 1
print('? ' + str(1) + ' ' + str(2) + ' ' + str(2) + ' ' + str(3))
sys.stdout.flush()
if int(input()) == 1:
	arr[2][3] = 1
else:
	arr[2][3] = 0
print('? ' + str(2) + ' ' + str(1) + ' ' + str(2) + ' ' + str(3))
sys.stdout.flush()
if int(input()) == 1:
	arr[2][1] = arr[2][3]
else:
	arr[2][1] = 1 - arr[2][3]
print('? ' + str(2) + ' ' + str(1) + ' ' + str(3) + ' ' + str(2))
sys.stdout.flush()
if int(input()) == 1:
	arr[3][2] = arr[2][1]
else:
	arr[3][2] = 1 - arr[2][1]
for i in range(1, n + 1):
	for j in range(1, n + 1):
		if (j - i) % 2 == 1 and (i != 1 or j != 2) and (i != 2 or j != 1) and (i != 2 or j != 3) and (i != 3 or j != 2):
			if j == 1:
				print('? ' + str(i - 2) + ' ' + str(j) + ' ' + str(i) + ' ' + str(j))
				sys.stdout.flush()
				if int(input()) == 1:
					arr[i][j] = arr[i - 2][j]
				else:
					arr[i][j] = 1 - arr[i - 2][j]
			elif i == 1:
				print('? ' + str(i) + ' ' + str(j - 2) + ' ' + str(i) + ' ' + str(j))
				sys.stdout.flush()
				if int(input()) == 1:
					arr[i][j] = arr[i][j - 2]
				else:
					arr[i][j] = 1 - arr[i][j - 2]
			else:
				print('? ' + str(i - 1) + ' ' + str(j - 1) + ' ' + str(i) + ' ' + str(j))
				sys.stdout.flush()
				if int(input()) == 1:
					arr[i][j] = arr[i - 1][j - 1]
				else:
					arr[i][j] = 1 - arr[i - 1][j - 1]
doFlip = [[1, 0, 1, 0], [1, 1, 0, 0], [0, 0, 1, 1], [0, 1, 0, 1]]
dontFlip = [[1, 0, 0, 1], [1, 1, 1, 1], [0, 0, 0, 0], [0, 1, 1, 0]]
for i in range(1, n + 1):
	for j in range(1, n + 1):
		if i <= n - 3:
			if [arr[i][j], arr[i + 1][j], arr[i + 2][j], arr[i + 3][j]] in doFlip:
				print('? ' + str(i) + ' ' + str(j) + ' ' + str(i + 3) + ' ' + str(j))
				sys.stdout.flush()
				if int(input()) == 1:
					arr = flipEven(arr)
				print('!')
				for i in range(1, n + 1):
					print(''.join(map(str, arr[i][1:])))
				exit()
			elif [arr[i][j], arr[i + 1][j], arr[i + 2][j], arr[i + 3][j]] in dontFlip:
				print('? ' + str(i) + ' ' + str(j) + ' ' + str(i + 3) + ' ' + str(j))
				sys.stdout.flush()
				if int(input()) == 0:
					arr = flipEven(arr)
				print('!')
				for i in range(1, n + 1):
					print(''.join(map(str, arr[i][1:])))
				exit()
		if i <= n - 2 and j <= n - 1:
			if [arr[i][j], arr[i + 1][j], arr[i + 2][j], arr[i + 2][j + 1]] in doFlip:
				print('? ' + str(i) + ' ' + str(j) + ' ' + str(i + 2) + ' ' + str(j + 1))
				sys.stdout.flush()
				if int(input()) == 1:
					arr = flipEven(arr)
				print('!')
				for i in range(1, n + 1):
					print(''.join(map(str, arr[i][1:])))
				exit()()
			elif [arr[i][j], arr[i + 1][j], arr[i + 2][j], arr[i + 2][j + 1]] in dontFlip:
				print('? ' + str(i) + ' ' + str(j) + ' ' + str(i + 2) + ' ' + str(j + 1))
				sys.stdout.flush()
				if int(input()) == 0:
					arr = flipEven(arr)
				print('!')
				for i in range(1, n + 1):
					print(''.join(map(str, arr[i][1:])))
				exit()
		if i <= n - 2 and j <= n - 1:
			if [arr[i][j], arr[i + 1][j], arr[i + 1][j + 1], arr[i + 2][j + 1]] in doFlip:
				print('? ' + str(i) + ' ' + str(j) + ' ' + str(i + 2) + ' ' + str(j + 1))
				sys.stdout.flush()
				if int(input()) == 1:
					arr = flipEven(arr)
				print('!')
				for i in range(1, n + 1):
					print(''.join(map(str, arr[i][1:])))
				exit()
			elif [arr[i][j], arr[i + 1][j], arr[i + 1][j + 1], arr[i + 2][j + 1]] in dontFlip:
				print('? ' + str(i) + ' ' + str(j) + ' ' + str(i + 2) + ' ' + str(j + 1))
				sys.stdout.flush()
				if int(input()) == 0:
					arr = flipEven(arr)
				print('!')
				for i in range(1, n + 1):
					print(''.join(map(str, arr[i][1:])))
				exit()
		if i <= n - 2 and j <= n - 1:
			if [arr[i][j], arr[i][j + 1], arr[i + 1][j + 1], arr[i + 2][j + 1]] in doFlip:
				print('? ' + str(i) + ' ' + str(j) + ' ' + str(i + 2) + ' ' + str(j + 1))
				sys.stdout.flush()
				if int(input()) == 1:
					arr = flipEven(arr)
				print('!')
				for i in range(1, n + 1):
					print(''.join(map(str, arr[i][1:])))
				exit()
			elif [arr[i][j], arr[i][j + 1], arr[i + 1][j + 1], arr[i + 2][j + 1]] in dontFlip:
				print('? ' + str(i) + ' ' + str(j) + ' ' + str(i + 2) + ' ' + str(j + 1))
				sys.stdout.flush()
				if int(input()) == 0:
					arr = flipEven(arr)
				print('!')
				for i in range(1, n + 1):
					print(''.join(map(str, arr[i][1:])))
				exit()
		if i <= n - 1 and j <= n - 2:
			if [arr[i][j], arr[i][j + 1], arr[i + 1][j + 1], arr[i + 1][j + 2]] in doFlip:
				print('? ' + str(i) + ' ' + str(j) + ' ' + str(i + 1) + ' ' + str(j + 2))
				sys.stdout.flush()
				if int(input()) == 1:
					arr = flipEven(arr)
				print('!')
				for i in range(1, n + 1):
					print(''.join(map(str, arr[i][1:])))
				exit()
			elif [arr[i][j], arr[i][j + 1], arr[i + 1][j + 1], arr[i + 1][j + 2]] in dontFlip:
				print('? ' + str(i) + ' ' + str(j) + ' ' + str(i + 1) + ' ' + str(j + 2))
				sys.stdout.flush()
				if int(input()) == 0:
					arr = flipEven(arr)
				print('!')
				for i in range(1, n + 1):
					print(''.join(map(str, arr[i][1:])))
				exit()
		if i <= n - 1 and j <= n - 2:
			if [arr[i][j], arr[i + 1][j], arr[i + 1][j + 1], arr[i + 1][j + 2]] in doFlip:
				print('? ' + str(i) + ' ' + str(j) + ' ' + str(i + 1) + ' ' + str(j + 2))
				sys.stdout.flush()
				if int(input()) == 1:
					arr = flipEven(arr)
				print('!')
				for i in range(1, n + 1):
					print(''.join(map(str, arr[i][1:])))
				exit()
			elif [arr[i][j], arr[i + 1][j], arr[i + 1][j + 1], arr[i + 1][j + 2]] in dontFlip:
				print('? ' + str(i) + ' ' + str(j) + ' ' + str(i + 1) + ' ' + str(j + 2))
				sys.stdout.flush()
				if int(input()) == 0:
					arr = flipEven(arr)
				print('!')
				for i in range(1, n + 1):
					print(''.join(map(str, arr[i][1:])))
				exit()
		if i <= n - 1 and j <= n - 2:
			if [arr[i][j], arr[i][j + 1], arr[i][j + 2], arr[i + 1][j + 2]] in doFlip:
				print('? ' + str(i) + ' ' + str(j) + ' ' + str(i + 1) + ' ' + str(j + 2))
				sys.stdout.flush()
				if int(input()) == 1:
					arr = flipEven(arr)
				print('!')
				for i in range(1, n + 1):
					print(''.join(map(str, arr[i][1:])))
				exit()
			elif [arr[i][j], arr[i][j + 1], arr[i][j + 2], arr[i + 1][j + 2]] in dontFlip:
				print('? ' + str(i) + ' ' + str(j) + ' ' + str(i + 1) + ' ' + str(j + 2))
				sys.stdout.flush()
				if int(input()) == 0:
					arr = flipEven(arr)
				print('!')
				for i in range(1, n + 1):
					print(''.join(map(str, arr[i][1:])))
				exit()
		if j <= n - 3:
			if [arr[i][j], arr[i][j + 1], arr[i][j + 2], arr[i][j + 3]] in doFlip:
				print('? ' + str(i) + ' ' + str(j) + ' ' + str(i) + ' ' + str(j + 3))
				sys.stdout.flush()
				if int(input()) == 1:
					arr = flipEven(arr)
				print('!')
				for i in range(1, n + 1):
					print(''.join(map(str, arr[i][1:])))
				exit()
			elif [arr[i][j], arr[i][j + 1], arr[i][j + 2], arr[i][j + 3]] in dontFlip:
				print('? ' + str(i) + ' ' + str(j) + ' ' + str(i) + ' ' + str(j + 3))
				sys.stdout.flush()
				if int(input()) == 0:
					arr = flipEven(arr)
				print('!')
				for i in range(1, n + 1):
					print(''.join(map(str, arr[i][1:])))
				exit()


import sys

def req(a, b, c, d):
	print('?', a + 1, b + 1, c + 1, d + 1)
	sys.stdout.flush()
	return int(input())
n = int(input())
r = [[0] * n for _ in range(n)]

def tt(xx, yy, x, y):
	if xx > x or yy > y:
		q = req(x, y, xx, yy)
	else:
		q = req(xx, yy, x, y)
	if q == -1:
		exit()
	elif q == 1:
		r[x][y] = r[xx][yy]
	else:
		r[x][y] = 1 - r[xx][yy]
r[0][0] = 1
for x in range(n):
	for y in range(x & 1, n, 2):
		if x == 0 and y == 0:
			continue
		if x == n - 1 and y == n - 1:
			continue
		if x == 0:
			(xx, yy) = (x, y - 2)
		elif y == 0:
			(xx, yy) = (x - 2, y)
		else:
			(xx, yy) = (x - 1, y - 1)
		tt(xx, yy, x, y)
tt(0, 1, 2, 1)
tt(2, 1, 1, 0)
for x in range(n):
	for y in range(1 - (x & 1), n, 2):
		if x == 1 and y == 0:
			continue
		if x == 0 and y == 1:
			continue
		if x == 2 and y == 1:
			continue
		if x == 0:
			(xx, yy) = (x, y - 2)
		elif y == 0:
			(xx, yy) = (x - 2, y)
		else:
			(xx, yy) = (x - 1, y - 1)
		tt(xx, yy, x, y)

def inv():
	for x in range(n):
		for y in range(1 - (x & 1), n, 2):
			r[x][y] = 1 - r[x][y]

def zz():
	for x in range(n - 1):
		for y in range(n - 2):
			if r[x][y + 1] != r[x + 1][y] or r[x][y + 2] != r[x + 1][y + 1] or (r[x][y] == r[x][y + 2]) == (r[x + 1][y] == r[x + 1][y + 2]):
				q = req(x, y, x + 1, y + 2)
				if q == -1:
					exit()
				elif q != (r[x][y] == r[x + 1][y + 2]):
					inv()
				return
zz()
print('!')
sys.stdout.flush()
for x in r:
	print(''.join(map(str, x)))


from sys import stdout
n = int(input())

def query(i, j, k, l):
	print('? {} {} {} {}'.format(i, j, k, l))
	if k + l - i - j == 2:
		res = 1 if m[i - 1][j - 1] == m[k - 1][l - 1] else 0
	if k + l - i - j == 3:
		assert k > i and l > j
		isok = a[i - 1][j - 1] == a[k - 1][l - 1]
		if isok:
			lautre = m[k - 2][j - 1] == m[k - 1][j - 1] if k - i == 2 else m[i - 1][l - 1] == m[i - 1][l - 2]
			matchpal = m[i][j - 1] == m[i][j] or m[i - 1][j] == m[i][j] or lautre
			isok &= matchpal
		res = 1 if isok else 0
	print(res)
	return res

def req(i, j, k, l):
	print('? {} {} {} {}'.format(i, j, k, l))
	stdout.flush()
	rep = int(input())
	return rep
a = [[0 for i in range(n)] for j in range(n)]
a[0][0] = 1
a[n - 1][n - 1] = -1
a[0][1] = 2
prev = (0, 1)
i = 2
j = 1
rep = req(prev[0] + 1, prev[1] + 1, i + 1, j + 1)
if rep:
	a[i][j] = a[prev[0]][prev[1]]
else:
	a[i][j] = -a[prev[0]][prev[1]]
prev = (2, 1)
i = 1
j = 0
rep = req(i + 1, j + 1, prev[0] + 1, prev[1] + 1)
if rep:
	a[i][j] = a[prev[0]][prev[1]]
else:
	a[i][j] = -a[prev[0]][prev[1]]
for i in range(n):
	for j in range(n):
		if not a[i][j]:
			prev = (i - 1, j - 1) if i and j else (i - 2, j) if i else (i, j - 2)
			rep = req(prev[0] + 1, prev[1] + 1, i + 1, j + 1)
			if rep:
				a[i][j] = a[prev[0]][prev[1]]
			else:
				a[i][j] = -a[prev[0]][prev[1]]
			assert a[i][j]
baserec = (-1, -1)
for i in range(n - 2):
	for j in range(n - 2):
		if (i + j + 1) % 2 and a[i][j] != a[i + 2][j + 2]:
			baserec = (i, j)
			break
	if baserec[0] != -1:
		break
assert baserec[0] != -1
(i, j) = baserec
rv2 = None
if a[i][j + 1] == a[i + 1][j + 2]:
	if a[i + 1][j + 1] == a[i][j]:
		prev = (i, j)
		curr = (i + 1, j + 2)
		rep = req(prev[0] + 1, prev[1] + 1, curr[0] + 1, curr[1] + 1)
		if rep:
			rv2 = a[i][j] if a[i][j + 1] == 2 else -a[i][j]
		else:
			rv2 = -a[i][j] if a[i][j + 1] == 2 else a[i][j]
	else:
		prev = (i, j + 1)
		curr = (i + 2, j + 2)
		rep = req(prev[0] + 1, prev[1] + 1, curr[0] + 1, curr[1] + 1)
		if rep:
			rv2 = a[i + 1][j + 1] if a[i][j + 1] == 2 else -a[i + 1][j + 1]
		else:
			rv2 = -a[i + 1][j + 1] if a[i][j + 1] == 2 else a[i + 1][j + 1]
elif a[i + 1][j + 1] != a[i][j]:
	prev = (i, j)
	curr = (i + 1, j + 2)
	rep = req(prev[0] + 1, prev[1] + 1, curr[0] + 1, curr[1] + 1)
	if rep:
		rv2 = a[i + 1][j + 1] if a[i][j + 1] == 2 else -a[i + 1][j + 1]
	else:
		rv2 = -a[i + 1][j + 1] if a[i][j + 1] == 2 else a[i + 1][j + 1]
else:
	prev = (i, j + 1)
	curr = (i + 2, j + 2)
	rep = req(prev[0] + 1, prev[1] + 1, curr[0] + 1, curr[1] + 1)
	if rep:
		rv2 = a[i + 1][j + 1] if a[i + 1][j + 2] == 2 else -a[i + 1][j + 1]
	else:
		rv2 = -a[i + 1][j + 1] if a[i + 1][j + 2] == 2 else a[i + 1][j + 1]
for i in range(n):
	for j in range(n):
		if a[i][j] in (-2, 2):
			a[i][j] = rv2 if a[i][j] == 2 else -rv2
print('!')
for i in range(n):
	r = ''
	for j in range(n):
		r += '1' if a[i][j] > 0 else '0'
	print(r)
stdout.flush()


import sys

def ask(x1, y1, x2, y2):
	print(f'? {x1} {y1} {x2} {y2}')
	inp = int(input())
	sys.stdout.flush()
	return inp

def main():
	n = int(input())
	grid = [[None] * (n + 1) for _ in range(n + 1)]
	grid[1][1] = 1
	grid[n][n] = 0
	grid[1][3] = ask(1, 1, 1, 3)
	grid[2][2] = ask(1, 1, 2, 2)
	grid[1][2] = 1
	grid[2][3] = ask(1, 2, 2, 3)
	grid[2][1] = grid[2][3] if ask(2, 1, 2, 3) == 1 else 1 ^ grid[2][3]
	for i in [1, 2]:
		for j in range(4, n + 1):
			grid[i][j] = grid[i][j - 2] if ask(i, j - 2, i, j) == 1 else 1 ^ grid[i][j - 2]
	for i in range(3, n + 1):
		for j in range(1, n + 1):
			if i == n and j == n:
				continue
			grid[i][j] = grid[i - 2][j] if ask(i - 2, j, i, j) == 1 else 1 ^ grid[i - 2][j]
	assumption_ok = True
	for i in range(1, n):
		to_break = False
		for j in range(1, n - 1):
			if grid[i][j] != grid[i + 1][j + 2] and (grid[i][j + 1] != grid[i][j + 2] or grid[i][j + 1] != grid[i + 1][j + 1] or grid[i + 1][j] != grid[i + 1][j + 1]):
				if ask(i, j, i + 1, j + 2) == 1:
					assumption_ok = False
				to_break = True
				break
			elif grid[i][j] == grid[i + 1][j + 2] and (grid[i][j + 1] == grid[i][j + 2] or grid[i][j + 1] == grid[i + 1][j + 1] or grid[i + 1][j] == grid[i + 1][j + 1]):
				if ask(i, j, i + 1, j + 2) == 0:
					assumption_ok = False
				to_break = True
				break
		if to_break:
			break
	if not assumption_ok:
		for i in range(1, n + 1):
			for j in range(2 if i & 1 == 1 else 1, n + 1, 2):
				grid[i][j] ^= 1
	ansL = ['!\n']
	for row in grid[1:]:
		ansL += [str(row_elem) for row_elem in row[1:]]
		ansL.append('\n')
	sys.stdout.write(''.join(ansL))
main()


import sys
input = sys.stdin.readline
n = int(input())
ANS = [[-1] * (n + 1) for i in range(n + 1)]
ANS[1][1] = 1
ANS[n][n] = 0
for i in range(1, n + 1):
	for j in range(1, n + 1):
		if (i + j) % 2 == 1:
			continue
		if i == j == 1 or i == j == n:
			continue
		if i == 1:
			print('?', i, j - 2, i, j, flush=True)
			x = int(input())
			if x == 1:
				ANS[i][j] = ANS[i][j - 2]
			else:
				ANS[i][j] = 1 - ANS[i][j - 2]
		elif i == 2:
			print('?', i - 1, j - 1, i, j, flush=True)
			x = int(input())
			if x == 1:
				ANS[i][j] = ANS[i - 1][j - 1]
			else:
				ANS[i][j] = 1 - ANS[i - 1][j - 1]
		else:
			print('?', i - 2, j, i, j, flush=True)
			x = int(input())
			if x == 1:
				ANS[i][j] = ANS[i - 2][j]
			else:
				ANS[i][j] = 1 - ANS[i - 2][j]
ANS[1][2] = 2
for i in range(1, n + 1):
	for j in range(2, n + 1):
		if (i + j) % 2 == 0:
			continue
		if i == 1 and j == 2:
			continue
		if i == 1:
			print('?', i, j - 2, i, j, flush=True)
			x = int(input())
			if x == 1:
				ANS[i][j] = ANS[i][j - 2]
			else:
				ANS[i][j] = 5 - ANS[i][j - 2]
		elif i == 2:
			print('?', i - 1, j - 1, i, j, flush=True)
			x = int(input())
			if x == 1:
				ANS[i][j] = ANS[i - 1][j - 1]
			else:
				ANS[i][j] = 5 - ANS[i - 1][j - 1]
		else:
			print('?', i - 2, j, i, j, flush=True)
			x = int(input())
			if x == 1:
				ANS[i][j] = ANS[i - 2][j]
			else:
				ANS[i][j] = 5 - ANS[i - 2][j]
for i in range(2, n + 1, 2):
	print('?', i, 1, i, 3, flush=True)
	x = int(input())
	if x == 1:
		ANS[i][1] = ANS[i][3]
	else:
		ANS[i][1] = 5 - ANS[i][3]
SET = {(0, 0, 2, 2), (0, 0, 3, 3), (1, 1, 2, 2), (1, 1, 3, 3), (0, 1, 2, 3)}
flag = 0
for i in range(1, n + 1):
	if flag:
		break
	for j in range(1, n + 1):
		if j + 3 <= n:
			if tuple(sorted([ANS[i][j], ANS[i][j + 1], ANS[i][j + 2], ANS[i][j + 3]])) in SET:
				flag = 1
				LAST = [i, j, i, j + 3]
				break
		if i + 1 <= n and j + 2 <= n:
			if tuple(sorted([ANS[i][j], ANS[i][j + 1], ANS[i][j + 2], ANS[i + 1][j + 2]])) in SET:
				flag = 1
				LAST = [i, j, i + 1, j + 2]
				break
		if i + 1 <= n and j + 2 <= n:
			if tuple(sorted([ANS[i][j], ANS[i][j + 1], ANS[i + 1][j + 1], ANS[i + 1][j + 2]])) in SET:
				flag = 1
				LAST = [i, j, i + 1, j + 2]
				break
		if i + 2 <= n and j + 1 <= n:
			if tuple(sorted([ANS[i][j], ANS[i][j + 1], ANS[i + 1][j + 1], ANS[i + 2][j + 1]])) in SET:
				flag = 1
				LAST = [i, j, i + 2, j + 1]
				break
		if i + 1 <= n and j + 2 <= n:
			if tuple(sorted([ANS[i][j], ANS[i + 1][j], ANS[i + 1][j + 1], ANS[i + 1][j + 2]])) in SET:
				flag = 1
				LAST = [i, j, i + 1, j + 2]
				break
		if i + 2 <= n and j + 1 <= n:
			if tuple(sorted([ANS[i][j], ANS[i + 1][j], ANS[i + 1][j + 1], ANS[i + 2][j + 1]])) in SET:
				flag = 1
				LAST = [i, j, i + 2, j + 1]
				break
		if i + 2 <= n and j + 1 <= n:
			if tuple(sorted([ANS[i][j], ANS[i + 1][j], ANS[i + 2][j], ANS[i + 2][j + 1]])) in SET:
				flag = 1
				LAST = [i, j, i + 2, j + 1]
				break
		if i + 3 <= n:
			if tuple(sorted([ANS[i][j], ANS[i + 1][j], ANS[i + 2][j], ANS[i + 3][j]])) in SET:
				flag = 1
				LAST = [i, j, i + 3, j]
				break
print('?', LAST[0], LAST[1], LAST[2], LAST[3], flush=True)
x = int(input())
DECIDE = sorted([ANS[LAST[0]][LAST[1]], ANS[LAST[2]][LAST[3]]])
if x == 1:
	DICT = {DECIDE[1]: DECIDE[0], 5 - DECIDE[1]: 1 - DECIDE[0]}
else:
	DICT = {DECIDE[1]: 1 - DECIDE[0], 5 - DECIDE[1]: DECIDE[0]}
for i in range(1, n + 1):
	for j in range(1, n + 1):
		if (i + j) % 2 == 1:
			ANS[i][j] = DICT[ANS[i][j]]
print('!')
for a in ANS[1:]:
	print(''.join(map(str, a[1:])))


import sys

def query(x1, y1, x2, y2):
	print('?', x1, y1, x2, y2)
	sys.stdout.flush()
	odp = int(input())
	return odp
n = int(input())
mat = [[2 for c in range(n + 1)] for r in range(n + 1)]
mat[1][1] = 1
mat[n][n] = 0
for d in range(1, n - 1):
	odp = query(d, d, d + 1, d + 1)
	if odp:
		mat[d + 1][d + 1] = mat[d][d]
	else:
		mat[d + 1][d + 1] = 1 - mat[d][d]
d = 1
while True:
	if mat[d][d] != mat[d + 2][d + 2]:
		break
	d += 2
pom1 = query(d, d, d + 2, d)
pom2 = query(d + 1, d, d + 2, d + 1)
if pom1 == 0 and pom2 == 0:
	pom3 = query(d, d, d + 2, d + 1)
	if pom3 == 1:
		mat[d + 1][d] = 1 - mat[d][d]
		mat[d + 2][d] = 1 - mat[d][d]
		mat[d + 2][d + 1] = mat[d][d]
	else:
		mat[d + 1][d] = mat[d][d]
		mat[d + 2][d] = 1 - mat[d][d]
		mat[d + 2][d + 1] = 1 - mat[d][d]
if pom1 == 0 and pom2 == 1:
	pom3 = query(d + 1, d, d + 2, d + 2)
	if pom3 == 1:
		mat[d + 2][d + 1] = mat[d + 2][d + 2]
		mat[d + 2][d] = mat[d + 2][d + 2]
		mat[d + 1][d] = mat[d + 2][d + 2]
	else:
		mat[d + 2][d + 1] = 1 - mat[d + 2][d + 2]
		mat[d + 2][d] = mat[d + 2][d + 2]
		mat[d + 1][d] = 1 - mat[d + 2][d + 2]
if pom1 == 1 and pom2 == 0:
	pom3 = query(d + 1, d, d + 2, d + 2)
	if pom3 == 1:
		mat[d + 2][d + 1] = 1 - mat[d + 2][d + 2]
		mat[d + 2][d] = 1 - mat[d + 2][d + 2]
		mat[d + 1][d] = mat[d + 2][d + 2]
	else:
		mat[d + 2][d + 1] = mat[d + 2][d + 2]
		mat[d + 2][d] = 1 - mat[d + 2][d + 2]
		mat[d + 1][d] = 1 - mat[d + 2][d + 2]
if pom1 == 1 and pom2 == 1:
	pom3 = query(d, d, d + 2, d + 1)
	if pom3 == 1:
		mat[d + 2][d + 1] = mat[d][d]
		mat[d + 2][d] = mat[d][d]
		mat[d + 1][d] = mat[d][d]
	else:
		mat[d + 2][d + 1] = 1 - mat[d][d]
		mat[d + 2][d] = mat[d][d]
		mat[d + 1][d] = 1 - mat[d][d]
for r in [d + 1, d + 2]:
	c = d
	while c + 2 <= n:
		if mat[r][c + 2] == 2:
			odp = query(r, c, r, c + 2)
			if odp == 1:
				mat[r][c + 2] = mat[r][c]
			else:
				mat[r][c + 2] = 1 - mat[r][c]
		c += 1
	c = d + 1
	while c - 2 > 0:
		if mat[r][c - 2] == 2:
			odp = query(r, c - 2, r, c)
			if odp == 1:
				mat[r][c - 2] = mat[r][c]
			else:
				mat[r][c - 2] = 1 - mat[r][c]
		c -= 1
for c in range(1, n + 1):
	r = d + 1
	while r + 2 <= n:
		if mat[r + 2][c] == 2:
			odp = query(r, c, r + 2, c)
			if odp == 1:
				mat[r + 2][c] = mat[r][c]
			else:
				mat[r + 2][c] = 1 - mat[r][c]
		r += 1
	r = d + 2
	while r - 2 > 0:
		if mat[r - 2][c] == 2:
			odp = query(r - 2, c, r, c)
			if odp == 1:
				mat[r - 2][c] = mat[r][c]
			else:
				mat[r - 2][c] = 1 - mat[r][c]
		r -= 1
print('!')
for i in range(1, n + 1):
	slowo = ''
	for j in mat[i][1:]:
		slowo += str(j)
	print(slowo)


def main():
	import sys
	input = sys.stdin.readline

	def interact(x1, y1, x2, y2):
		print('?', x1, y1, x2, y2, flush=True)
		return int(input())

	def do_odds():
		for i in range(1, n - 1, 2):
			for j in range(3, n + 1, 2):
				tmp = interact(i, j - 2, i, j)
				grid[i - 1][j - 1] = tmp ^ grid[i - 1][j - 3] ^ 1
			for j in range(2, n, 2):
				tmp = interact(i, j - 1, i + 1, j)
				grid[i][j - 1] = tmp ^ grid[i - 1][j - 2] ^ 1
			tmp = interact(i, 1, i + 2, 1)
			grid[i + 1][0] = tmp ^ grid[i - 1][0] ^ 1
		for i in range(3, n - 1, 2):
			tmp = interact(n, i - 2, n, i)
			grid[n - 1][i - 1] = tmp ^ grid[n - 1][i - 3] ^ 1

	def do_evens(x):
		for i in range(1, n - 1, 2):
			for j in range(4, n, 2):
				tmp = interact(i, j - 2, i, j)
				grid[i - 1][j - 1] = tmp ^ grid[i - 1][j - 3] ^ 1
			for j in range(3, n + 1, 2):
				tmp = interact(i, j - 1, i + 1, j)
				grid[i][j - 1] = tmp ^ grid[i - 1][j - 2] ^ 1
			tmp = interact(i + 1, 1, i + 1, 3)
			grid[i][0] = tmp ^ grid[i][2] ^ 1
			tmp = interact(i, 2, i + 2, 2)
			grid[i + 1][1] = tmp ^ grid[i - 1][1] ^ 1
		for i in range(4, n, 2):
			tmp = interact(n, i - 2, n, i)
			grid[n - 1][i - 1] = tmp ^ grid[n - 1][i - 3] ^ 1
		i = x
		if grid[i][i + 1] == grid[i + 1][i + 2]:
			if grid[i + 1][i + 1] == 1:
				tmp = interact(i + 1, i + 1, i + 2, i + 3)
				offset = tmp ^ 1 ^ grid[i][i] ^ grid[i + 1][i + 2]
			else:
				tmp = interact(i + 1, i + 2, i + 3, i + 3)
				offset = tmp ^ 1 ^ grid[i + 2][i + 2] ^ grid[i][i + 1]
		elif grid[i + 1][i + 1] == 1:
			tmp = interact(i + 1, i + 2, i + 3, i + 3)
			offset = tmp ^ 1 ^ grid[i + 2][i + 2] ^ grid[i][i + 1]
		else:
			tmp = interact(i + 1, i + 1, i + 2, i + 3)
			offset = tmp ^ 1 ^ grid[i][i] ^ grid[i + 1][i + 2]
		for i in range(n):
			for j in range(i & 1 ^ 1, n, 2):
				grid[i][j] ^= offset
	n = int(input())
	grid = [[1] * n for _ in range(n)]
	grid[-1][-1] = 0
	do_odds()
	for i in range(2, n):
		if grid[i][i] == 0 and grid[i - 2][i - 2] == 1:
			do_evens(i - 2)
			break
	print('!', flush=True)
	for line in grid:
		print(''.join([str(i) for i in line]), flush=True)
main()