#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char a[55][55], b[105][105];
  int i, j;
  struct punct {
    int x, y;
  };
  punct o[2505], c[2505];
  int m = 2 * n - 1;
  for (i = 1; i <= m; i++)
    for (j = 1; j <= m; j++) b[i][j] = '.';
  b[n][n] = 'o';
  int p = 0;
  m = 0;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    for (j = 0; j < n; j++)
      if (a[i][j] == 'o') {
        p++;
        o[p].x = i;
        o[p].y = j;
      } else if (a[i][j] == 'x') {
        m++;
        c[m].x = i;
        c[m].y = j;
      }
  }
  for (i = 1; i <= m; i++) {
    int ok = false;
    for (j = 1; j <= p; j++) {
      int dx = o[j].x - c[i].x;
      int dy = o[j].y - c[i].y;
      int okay = true;
      for (int k = 1; k <= p; k++) {
        int ddx = o[k].x - dx;
        int ddy = o[k].y - dy;
        if (ddx >= 0 && ddx < n && ddy >= 0 && ddy < n) {
          if (a[ddx][ddy] == '.') okay = false, k = p + 1;
        }
      }
      if (okay == true) {
        ok = true;
        b[n - dx][n - dy] = 'x';
        j = p + 1;
      }
    }
    if (ok == false) {
      cout << "NO\n";
      return 0;
    }
  }
  cout << "YES\n";
  m = 2 * n - 1;
  for (i = 1; i <= m; i++) {
    for (j = 1; j <= m; j++) cout << b[i][j];
    cout << "\n";
  }
  return 0;
}
