#include <bits/stdc++.h>
using namespace std;
long long rdtsc() {
  long long tmp;
  asm("rdtsc" : "=A"(tmp));
  return tmp;
}
inline int myrand() { return abs((rand() << 15) ^ rand()); }
inline int rnd(int x) { return myrand() % x; }
const int INF = (int)1e9 + 1;
const long double EPS = 1e-9;
void precalc() {}
const int maxn = 50 + 10;
char table[maxn][maxn];
int n;
bool read() {
  if (scanf("%d", &n) < 1) {
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    scanf("%s", table[i]);
  }
  return 1;
}
bool ok(int x, int y) { return 0 <= x && 0 <= y && x < n && y < n; }
int people[maxn * maxn][2];
int col[maxn][maxn];
char moves[2 * maxn][2 * maxn];
void solve() {
  int cnt = 0;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      col[i][j] = 0;
      if (table[i][j] != 'o') {
        continue;
      }
      people[cnt][0] = i, people[cnt][1] = j, ++cnt;
    }
  }
  for (int dx = -n + 1; dx <= n - 1; ++dx) {
    moves[dx + n - 1][2 * n - 1] = 0;
    for (int dy = -n + 1; dy <= n - 1; ++dy) {
      moves[dx + n - 1][dy + n - 1] = '.';
      if (dx == 0 && dy == 0) {
        continue;
      }
      bool fail = 0;
      for (int i = 0; i < cnt; ++i) {
        int x = people[i][0], y = people[i][1];
        int nx = x + dx, ny = y + dy;
        if (!ok(nx, ny)) {
          continue;
        }
        if (table[nx][ny] == '.') {
          fail = 1;
          break;
        }
      }
      if (fail) {
        continue;
      }
      moves[dx + n - 1][dy + n - 1] = 'x';
      for (int i = 0; i < cnt; ++i) {
        int x = people[i][0], y = people[i][1];
        int nx = x + dx, ny = y + dy;
        if (!ok(nx, ny)) {
          continue;
        }
        col[nx][ny] = 1;
      }
    }
  }
  moves[n - 1][n - 1] = 'o';
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (table[i][j] == 'x' && !col[i][j]) {
        printf("NO\n");
        return;
      }
    }
  }
  printf("YES\n");
  for (int i = 0; i < 2 * n - 1; ++i) {
    printf("%s\n", moves[i]);
  }
}
int main() {
  srand(rdtsc());
  precalc();
  while (1) {
    if (!read()) {
      break;
    }
    solve();
  }
  return 0;
}
