#include <bits/stdc++.h>
using namespace std;
char c[155][155];
const int inf = 100;
set<int> mm, m1, m2;
struct pi {
  int x;
  int y;
} pp1[22550], pp2[22550];
int a[22550], tot;
bool vis[10105], vis2[10105], vis3[10105];
int get(int p, int k) { return (p + 50) * inf + k + 50; }
int main() {
  int i, j, n, m = 0, p = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    scanf("%s", c[i]);
    for (j = 0; j < n; j++) {
      c[i + n][j + n] = c[i][j];
    }
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < 3 * n; j++) c[i][j] = 'x';
  }
  for (i = n; i < 2 * n; i++) {
    for (j = 0; j < n; j++) c[i][j] = 'x';
    for (j = 2 * n; j < 3 * n; j++) c[i][j] = 'x';
  }
  for (i = 2 * n; i < 3 * n; i++) {
    for (j = 0; j < 3 * n; j++) {
      c[i][j] = 'x';
    }
  }
  for (i = 0; i < 3 * n; i++) {
    for (j = 0; j < 3 * n; j++) {
      if (c[i][j] == 'x') {
        pp1[p].x = i;
        pp1[p].y = j;
        p++;
        if (i >= n && i < 2 * n && j >= n && j < 2 * n) {
          vis3[get(i - n, j - n)] = 1;
        }
      } else if (c[i][j] == 'o') {
        pp1[p].x = i;
        pp1[p].y = j;
        p++;
        pp2[m].x = i;
        pp2[m].y = j;
        m++;
      }
    }
  }
  for (i = 0; i < m; i++) {
    if (i == 0) {
      for (j = 0; j < p; j++) {
        int x, y;
        x = pp1[j].x - pp2[i].x;
        y = pp1[j].y - pp2[i].y;
        if (x > -n && x < n && y > -n && y < n) {
          vis[get(x, y)] = 1;
        }
      }
    } else {
      memset(vis2, 0, sizeof(vis2));
      for (j = 0; j < p; j++) {
        int x, y;
        x = pp1[j].x - pp2[i].x;
        y = pp1[j].y - pp2[i].y;
        if (x > -n && x < n && y > -n && y < n) {
          int p = get(x, y);
          if (vis[p]) {
            vis2[p] = 1;
          }
        }
      }
      for (j = 0; j < 10102; j++) vis[j] = vis2[j];
    }
  }
  for (i = 0; i < m; i++) {
    for (j = 0; j < 10102; j++) {
      if (vis[j]) {
        int p = get(pp2[i].x - n, pp2[i].y - n) + j - 50 * inf - 50;
        if (p >= 0 && p <= 10102 && vis3[p]) {
          vis3[p] = 0;
        }
      }
    }
  }
  int q = 0;
  for (i = 0; i < 10102; i++) {
    if (vis3[i]) q++;
  }
  if (q)
    printf("NO\n");
  else {
    printf("YES\n");
    for (i = 0; i < 2 * n - 1; i++) {
      for (j = 0; j < 2 * n - 1; j++) {
        if (i == n - 1 && j == n - 1) {
          printf("o");
          continue;
        }
        if (vis[(get(i - (n - 1), j - (n - 1)))]) {
          printf("x");
        } else
          printf(".");
      }
      printf("\n");
    }
  }
}
