#include <bits/stdc++.h>
using namespace std;
char a[100][100];
char b[200][200];
char c[100][100];
vector<int> stk;
int main() {
  int n, i, j, k, siz;
  cin >> n;
  for (i = 0; i < n; i++)
    for (j = 0; j < n; j++) {
      cin >> a[i][j];
      if (a[i][j] == 'o') {
        stk.push_back(i);
        stk.push_back(j);
      }
    }
  siz = stk.size();
  for (i = 1; i < n * 2; i++)
    for (j = 1; j < n * 2; j++) {
      b[i][j] = 'o';
      int dx, dy, x, y;
      dx = i - n;
      dy = j - n;
      for (k = 0; k < siz; k += 2) {
        x = stk[k] + dx;
        y = stk[k + 1] + dy;
        if (x < 0 || x >= n || y < 0 || y >= n) continue;
        if (b[i][j] != '.') {
          if (a[x][y] != 'o') b[i][j] = a[x][y];
        }
      }
    }
  for (i = 0; i < n; i++)
    for (j = 0; j < n; j++) {
      c[i][j] = 'o';
      for (k = 0; k < siz; k += 2) {
        int x, y, dx, dy;
        x = stk[k];
        y = stk[k + 1];
        dx = n + i - x;
        dy = n + j - y;
        if (c[i][j] == 'o')
          c[i][j] = b[dx][dy];
        else if (c[i][j] == '.' && b[dx][dy] != 'o')
          c[i][j] = b[dx][dy];
      }
    }
  for (i = 0; i < n; i++)
    for (j = 0; j < n; j++) {
      if (c[i][j] == 'o') continue;
      if (a[i][j] == 'o') continue;
      if (c[i][j] != a[i][j]) {
        goto ERROR;
      }
    }
  goto OK;
ERROR:
  cout << "NO\n";
  goto NEXT;
OK:
  cout << "YES\n";
  for (i = 1; i < 2 * n; i++) {
    cout << endl;
    for (j = 1; j < 2 * n; j++) {
      if (i == n && j == n)
        cout << "o";
      else {
        if (b[i][j] == 'o')
          cout << '.';
        else
          cout << b[i][j];
      }
    }
  }
NEXT:;
}
