#include <bits/stdc++.h>
using namespace std;
int ok[105][105], isatk[105][105], cover[105][105];
char MAP[100][100];
struct XD {
  int a, b;
  XD(int _a, int _b) : a(_a), b(_b) {}
  XD() {}
};
vector<XD> data, atk;
int N;
void check(int x, int y) {
  for (int i = -N + 1; i < N; i++) {
    for (int j = -N + 1; j < N; j++) {
      int dx, dy;
      dx = x + i;
      dy = y + j;
      if (dx >= 0 && dy >= 0 && dx < N && dy < N) {
        if (MAP[dx][dy] == 'x') {
          ok[i + N][j + N]++;
          isatk[i + N][j + N] = 1;
        } else if (MAP[dx][dy] == 'o')
          ok[i + N][j + N]++;
      } else
        ok[i + N][j + N]++;
    }
  }
}
int findatk(int x, int y) {
  for (int i = 0; i < atk.size(); i++) {
    int dx, dy;
    dx = x + atk[i].a - N;
    dy = y + atk[i].b - N;
    if (dx >= 0 && dy >= 0 && dx < N && dy < N) {
      if (MAP[dx][dy] == '.')
        return 0;
      else
        cover[dx][dy] = 1;
    }
  }
  return 1;
}
int main() {
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> MAP[i];
    for (int j = 0; j < N; j++) {
      if (MAP[i][j] == 'o') data.push_back(XD(i, j));
    }
  }
  for (int i = 0; i < data.size(); i++) {
    check(data[i].a, data[i].b);
  }
  int flag = 1;
  for (int i = 1; i < 2 * N; i++) {
    for (int j = 1; j < 2 * N; j++) {
      if (ok[i][j] == data.size() && isatk[i][j]) {
        atk.push_back(XD(i, j));
      }
    }
  }
  for (int i = 0; i < data.size(); i++) {
    if (findatk(data[i].a, data[i].b) == 0) {
      flag = 0;
      break;
    }
  }
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++) {
      if (MAP[i][j] == 'x' && cover[i][j] == 0) flag = 0;
    }
  }
  if (flag) {
    cout << "YES\n";
    for (int i = 1; i < 2 * N; i++) {
      for (int j = 1; j < 2 * N; j++) {
        if (i == N && j == N)
          cout << "o";
        else if (ok[i][j] == data.size() && isatk[i][j]) {
          cout << "x";
        } else
          cout << ".";
      }
      cout << "\n";
    }
  } else {
    cout << "NO\n";
  }
  return 0;
}
