#include <bits/stdc++.h>
using namespace std;
string g[50];
vector<pair<int, int> > v;
int n;
vector<pair<int, int> > o, x;
int mp[100][100];
void add(int a, int b) { ++mp[a + n - 1][b + n - 1]; }
string sol[100];
string t[50];
bool check() {
  for (int(i) = 0; i < int(n); ++i) {
    for (int j = 0; j < n; ++j) {
      t[i] += '.';
      if (g[i][j] == 'o') t[i][j] = 'o';
    }
  }
  for (int(i) = 0; i < int(n); ++i) {
    for (int j = 0; j < n; ++j) {
      if (g[i][j] != 'o') continue;
      for (int k = 0; k < v.size(); ++k) {
        int nr = v[k].first + i;
        int nc = v[k].second + j;
        if (nr < 0 || nc < 0 || nr >= n || nc >= n) continue;
        if (t[nr][nc] == '.') t[nr][nc] = 'x';
      }
    }
  }
  bool ok = 1;
  for (int(i) = 0; i < int(n); ++i)
    if (t[i] != g[i]) ok = 0;
  return ok;
}
int main() {
  cin >> n;
  for (int(i) = 0; i < int(n); ++i) cin >> g[i];
  for (int(i) = 0; i < int(2 * n - 1); ++i) {
    for (int j = 0; j < 2 * n - 1; ++j) sol[i] += '.';
  }
  for (int(i) = 0; i < int(n); ++i) {
    for (int j = 0; j < n; ++j) {
      if (g[i][j] == 'o') o.push_back(make_pair(i, j));
      if (g[i][j] == 'x') x.push_back(make_pair(i, j));
    }
  }
  for (int i = 0; i < o.size(); ++i) {
    for (int r = 1 - n; r <= n - 1; ++r) {
      for (int c = 1 - n; c <= n - 1; ++c) {
        int nr = r + o[i].first;
        int nc = c + o[i].second;
        if (nr < 0 || nc < 0 || nr >= n || nc >= n || g[nr][nc] != '.')
          add(r, c);
      }
    }
  }
  for (int i = 0; i < x.size(); ++i) {
    int r = x[i].first, c = x[i].second;
    for (int j = 0; j < o.size(); ++j) {
      int dx = r - o[j].first + n - 1;
      int dy = c - o[j].second + n - 1;
      if (mp[dx][dy] == o.size()) {
        v.push_back(make_pair(dx - n + 1, dy - n + 1));
        break;
      }
    }
  }
  if (check()) {
    sol[n - 1][n - 1] = 'o';
    for (int i = 0; i < v.size(); ++i)
      sol[n - 1 + v[i].first][n - 1 + v[i].second] = 'x';
    cout << "YES" << endl;
    for (int i = 0; i < n * 2 - 1; ++i) cout << sol[i] << endl;
    return 0;
  }
  puts("NO");
}
