#include <bits/stdc++.h>
using namespace std;
const int inf = 0x20202020;
const long long mod = 1000000007;
const double eps = 1e-9;
const double pi = 3.1415926535897932384626;
const int DX[] = {1, 0, -1, 0}, DY[] = {0, 1, 0, -1};
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long powmod(long long a, long long b, long long mod) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
template <class X>
void debug(vector<X>& v) {
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
  cout << endl;
}
char grid[60][60], R[120][120];
int vst[60][60];
vector<pair<int, int> > V;
int main() {
  int i, j, k, T, cas = 0;
  int n;
  cin >> n;
  for (i = 1; i <= n; i++) {
    scanf("%s", grid[i] + 1);
  }
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= n; j++) {
      if (grid[i][j] == 'o') {
        V.push_back(make_pair(i, j));
      } else if (grid[i][j] == 'x')
        vst[i][j] = 2;
    }
  }
  for (i = 1; i <= 2 * n; i++) {
    for (j = 1; j <= 2 * n; j++) {
      if (j == 2 * n)
        R[i][j] = 0;
      else
        R[i][j] = '.';
    }
  }
  R[n][n] = 'o';
  pair<int, int> u, v;
  for (int dx = -(n - 1); dx <= n - 1; dx++) {
    for (int dy = -(n - 1); dy <= n - 1; dy++) {
      if (dx == 0 && dy == 0) continue;
      bool t = 1;
      for (i = 0; i < ((int)(V).size()); i++) {
        u = V[i];
        v.first = u.first + dx;
        v.second = u.second + dy;
        if (v.first < 1 || v.first > n || v.second < 1 || v.second > n)
          continue;
        if (grid[v.first][v.second] == '.') {
          t = 0;
          break;
        }
      }
      if (t == 0) continue;
      for (i = 0; i < ((int)(V).size()); i++) {
        u = V[i];
        v.first = u.first + dx;
        v.second = u.second + dy;
        if (v.first < 1 || v.first > n || v.second < 1 || v.second > n)
          continue;
        if (grid[v.first][v.second] == 'x') {
          vst[v.first][v.second] = 1;
        }
      }
      R[n + dx][n + dy] = 'x';
    }
  }
  bool t = 1;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= n; j++) {
      if (vst[i][j] == 2) {
        t = 0;
        break;
      }
    }
  }
  if (t == 0)
    printf("NO\n");
  else {
    printf("YES\n");
    for (i = 1; i <= 2 * n - 1; i++) {
      printf("%s\n", R[i] + 1);
    }
  }
  return 0;
}
