// Arup Guha
// Started 3/14/2022, finished on 3/23/2022
// Solution to SER 2021 D1/D2 Problem: Diagonals

/*** Note: I would have definitely never gottent his in contest. I used the data to speed up my solution.
           I did have one obvious inefficiency which was a logical oversight on my end which I could have caught
		   in contest. But, after I fixed that, I still had two cases, tt.in and tt3.in, that were running too slow.
		   I added some extra forces, things like if the number is a 2 and we're on the second to last spot for it
		   and haven't placed anything, force this diagonal. But, this only sped up tt3.in not tt.in. Finally, I 
		   sort of cheated...I realized that you can flip the input, solve that, and flip the answer back. Since this
		   works, what you can do is pre-analyze the input and see whether the top half or bottom half has more forces.
		   If the bottom half does, then flip the grid (reflect over a horizontal line in the middle), solve it, and
		   flip the answer back. This is because backtracking will run faster if the pruning occurs earlier.
***/

import java.util.*;

public class diagonals {
	
	final public static int OK = 100;

	public static int n;
	public static int[][] count;
	public static char[][] res;
	public static djrestore dj;
	public static int[][] curCnt;
	
	public static void main(String[] args) {
	
		Scanner stdin = new Scanner(System.in);
		n = stdin.nextInt();
		count = new int[n+1][n+1];
		curCnt = new int[n+1][n+1];
		res = new char[n][n];
		
		// Read in numbers. -1 means no requirement.
		for (int i=0; i<n+1; i++) {
			char[] line = stdin.next().toCharArray();
			for (int j=0; j<n+1; j++) {
				if (line[j] == '+') count[i][j] = OK;
				else				count[i][j] = line[j]-'0';
			}
		}
		
		// Count forced squares in both halves.
		int topForce = 0, bottomForce = 0;
		for (int i=0; i<n; i++) {
			for (int j=0; j<n; j++) {
				if (forceBack(i,j) || forceForward(i,j)) {
					if (i<n/2) topForce++;
					else bottomForce++;
				}
			}
		}
		
		// Flip it, if there are more forces on the bottom, to prune the recursion tree faster.
		boolean flipped = false;
		if (bottomForce > topForce) {
			flipped = true;
			flip();
		}
		
		// Restorable DJ Set.
		dj = new djrestore((n+1)*(n+1));
		
		// Solve.
		go(0);
		
		// Flip back if we need to.
		if (flipped) flipRes();
		
		// Ta da!
		for (int i=0; i<n; i++)
			System.out.println(new String(res[i]));
	}
	
	
	
	// Returns if the following puzzle is solvable or not with the first k slots fixed.
	public static boolean go(int k) {
	
		// We finished filling stuff in. See if it worked.
		if (k == n*n) return check();
		
		// Get current row, column of boxes.
		int r = k/n;
		int c = k%n;
		
		// Not possible because we can only add 1 more to this count.
		if (count[r][c] != OK && curCnt[r][c]+1 < count[r][c]) return false;
		
		// Special end of row case.
		if (c == n-1 && count[r][c+1] != OK && curCnt[r][c+1]+1 < count[r][c+1]) return false;
		
		// Special last row case.
		if (r == n-1 && count[r+1][c] != OK && curCnt[r+1][c]+1 < count[r+1][c]) return false;
		
		/*** Do all forces!!! ***/
		boolean back = forceBack(r,c);
		boolean front = forceForward(r,c);
		
		// This one has to be added to make it match.
		if (curCnt[r][c]+1 == count[r][c]) back = true;
		
		// This is one of the last 2.
		if (curCnt[r][c+1]+2 == count[r][c+1]) front = true;
		
		// Forces because we can't add any more.
		if (curCnt[r][c] == count[r][c]) front = true;
		if (curCnt[r][c+1] == count[r][c+1]) back = true;
		if (curCnt[r+1][c] == count[r+1][c]) back = true;
		if (curCnt[r+1][c+1] == count[r+1][c+1]) front = true;
		
		// End of the row, additional forces.
		if (c==n-1 && curCnt[r][c+1]+1 == count[r][c+1]) front = true;
		
		// Last row other forces.
		if (r == n-1 && curCnt[r+1][c]+1 == count[r+1][c]) front = true;
		
		// Oops!
		if (back && front) return false;

		// We can try to place a backward diagonal.
		if (back || (!front && curCnt[r][c] < count[r][c] && curCnt[r+1][c+1] < count[r+1][c+1])) {

			// Now check DJ union.
			if (dj.union(r*(n+1)+c, (r+1)*(n+1)+c+1)) {
				
				// Placing backward diagonal.
				res[r][c] = '\\';
				curCnt[r][c]++;
				curCnt[r+1][c+1]++;
				
				// Try it!
				boolean tmp = go(k+1);
				if (tmp) return true;
				
				// Undo.
				curCnt[r][c]--;
				curCnt[r+1][c+1]--;		
				dj.undo();
			}
		}

		// We can try to place a forward diagonal.
		if (front || (!back && curCnt[r][c+1] < count[r][c+1] && curCnt[r+1][c] < count[r+1][c])) {

			// Now check DJ union.
			if (dj.union(r*(n+1)+c+1, (r+1)*(n+1)+c)) {
				
				// Placing forward diagonal.
				res[r][c] = '/';
				curCnt[r][c+1]++;
				curCnt[r+1][c]++;
				
				// Try it!
				boolean tmp = go(k+1);
				if (tmp) return true;
				
				// Undo.
				curCnt[r][c+1]--;
				curCnt[r+1][c]--;		
				dj.undo();
			}
		}

		// If we get here it's a dead end.
		return false;
	}
	
	// Flips count grid, so we can solve bottom to top.
	public static void flip() {
		for (int i=0; i<(n+1)/2; i++) {
			int[] tmp = count[i];
			count[i] = count[n-i];
			count[n-i] = tmp;
		}
	}
	
	// Flips the result horizonally and all characters are exchanged for the other.
	public static void flipRes() {
		
		// First swap rows.
		for (int i=0; i<n/2; i++) {
			char[] tmp = res[i];
			res[i] = res[n-1-i];
			res[n-1-i] = tmp;
		}
		
		// And these all change!
		for (int i=0; i<n; i++) {
			for (int j=0; j<n; j++) {
				if (res[i][j] == '\\') 	res[i][j] = '/';
				else					res[i][j] = '\\';
			}
		}
	}
	
	// Returns the max number of diags to vertex (r, c).
	public static int maxDiag(int r, int c) {
		if ( (r==0 || r == n) && (c==0 || c==n) ) return 1;
		if ( r==0 || r==n || c==0 || c==n) return 2;
		return 4;
	}
	
	// Returns true if the location and (r,c) forces a backwards diagonal.
	public static boolean forceBack(int r, int c) {
		int mD1 = maxDiag(r, c);
		int mD2 = maxDiag(r+1, c+1);
		return mD1 == count[r][c] || mD2 == count[r+1][c+1] || count[r+1][c] == 0 || count[r][c+1] == 0;
	}
	
	// Returns true if the location at (r,c) forces a forward diagonal.
	public static boolean forceForward(int r, int c) {
		int mD1 = maxDiag(r, c+1);
		int mD2 = maxDiag(r+1, c);
		return mD1 == count[r][c+1] || mD2 == count[r+1][c] || count[r][c] == 0 || count[r+1][c+1] == 0;
	}	
	
	public static boolean check() {
		
		// Go to each square. If the square has a number and it doesn't match, we don't work.
		for (int i=0; i<n+1; i++) {
			for (int j=0; j<n+1; j++) {
				if (count[i][j] == OK) continue;
				if (count[i][j] != curCnt[i][j]) return false;
			}
		}
		
		// Good if we get here.
		return true;
	}
}

class djrestore {

	public int[] par;
	public int[] height;
	public Stack<state> uStack;
	
	public djrestore(int n) {
		par = new int[n];
		height = new int[n];
		for (int i=0; i<n; i++)
			par[i] = i;
		uStack = new Stack<state>();
	}
	
	// Find function without path compression.
	public int find(int u) {
		if (u == par[u]) return u;
		return find(par[u]);
	}
	
	public boolean union(int u, int v) {
	
		// Go to roots.
		u = find(u);
		v = find(v);
		
		// Same tree.
		if (u == v) return false;
		
		// Merging u to v. Remember that u used to be its own tree.
		if (height[u] < height[v]) {
			par[u] = v;
			uStack.push(new state(u, v, height[v]));
		}
		
		// Same but for v.
		else if (height[v] < height[u]) {
			par[v] = u;
			uStack.push(new state(v, u, height[u]));
		}
		
		// Pick u but u's height changes.
		else {
			par[v] = u;
			uStack.push(new state(v, u, height[u]));
			height[u]++;
		}
		
		return true;
	}
	
	public boolean undo() {
		
		if (uStack.size() == 0) return false;
		
		// Undo this connection.
		state tmp = uStack.pop();
		par[tmp.nMerge] = tmp.nMerge;
		height[tmp.nPar] = tmp.parH;
		return true;
	}
}

class state {
	
	public int nMerge;
	public int nPar;
	public int parH;
	
	public state(int u, int v, int h) {
		nMerge = u;
		nPar = v;
		parH = h;
	}
}