#include <bits/stdc++.h>
using namespace std;
char field[55][55];
char ans[120][120];
set<pair<int, int> > figures;
set<pair<int, int> > under_attack;
void solve() {
  int n;
  scanf("%d\n", &n);
  for (int i(0), _l((int)(n)-1); i <= _l; ++i) gets(field[i]);
  for (int i(0), _l((int)(n)-1); i <= _l; ++i)
    for (int j(0), _l((int)(n)-1); j <= _l; ++j) {
      if (field[i][j] == 'o') {
        figures.insert(make_pair(i, j));
      } else if (field[i][j] == 'x') {
        under_attack.insert(make_pair(i, j));
      }
    }
  set<pair<int, int> > possible_set;
  for (auto& f : figures) {
    for (auto& q : under_attack) {
      int dx(f.first - q.first);
      int dy(f.second - q.second);
      possible_set.insert(make_pair(dx, dy));
    }
  }
  vector<pair<int, int> > possible((possible_set).begin(),
                                   (possible_set).end());
  for (auto& f : figures) {
    vector<pair<int, int> > new_possible;
    for (auto& q : possible) {
      int dx(q.first), dy(q.second);
      pair<int, int> at(f.first - dx, f.second - dy);
      if (at.first < 0 || at.first >= n || at.second < 0 || at.second >= n) {
        new_possible.push_back(make_pair(dx, dy));
        continue;
      }
      if (under_attack.count(at) || figures.count(at))
        new_possible.push_back(make_pair(dx, dy));
    }
    possible = new_possible;
  }
  set<pair<int, int> > real_under_attack;
  for (auto& f : figures) {
    for (auto& q : possible) {
      int dx(q.first), dy(q.second);
      pair<int, int> at(f.first - dx, f.second - dy);
      if (at.first < 0 || at.first >= n || at.second < 0 || at.second >= n ||
          field[at.first][at.second] == 'o')
        continue;
      real_under_attack.insert(at);
    }
  }
  if (real_under_attack != under_attack) {
    puts("NO");
    return;
  }
  puts("YES");
  for (int i(0), _l((int)(2 * n - 1) - 1); i <= _l; ++i)
    for (int j(0), _l((int)(2 * n - 1) - 1); j <= _l; ++j) ans[i][j] = '.';
  for (int i(0), _l((int)(2 * n - 1) - 1); i <= _l; ++i) ans[i][2 * n - 1] = 0;
  ans[n - 1][n - 1] = 'o';
  for (auto& q : possible) {
    int dx(q.first), dy(q.second);
    pair<int, int> at(n - 1 - dx, n - 1 - dy);
    if (at.first < 0 || at.first >= 2 * n - 1 || at.second < 0 ||
        at.second >= 2 * n - 1)
      continue;
    ans[at.first][at.second] = 'x';
  }
  for (int i(0), _l((int)(2 * n - 1) - 1); i <= _l; ++i) puts(ans[i]);
}
int main() {
  solve();
  return 0;
}
