#include <bits/stdc++.h>
using namespace std;
int n;
vector<string> a;
vector<vector<char> > ans;
vector<pair<int, int> > fig;
void setAns(int x, int y, char c) { ans[x + n - 1][y + n - 1] = c; }
bool check(int dx, int dy) {
  for (int i = 0; i < fig.size(); i++) {
    int x = dx + fig[i].first;
    int y = dy + fig[i].second;
    if (x < 0 || x >= n || y < 0 || y >= n) continue;
    if (a[x][y] == '.') {
      return false;
    }
  }
  for (int i = 0; i < fig.size(); i++) {
    int x = dx + fig[i].first;
    int y = dy + fig[i].second;
    if (x < 0 || x >= n || y < 0 || y >= n) continue;
    if (a[x][y] == 'x') {
      a[x][y] = 'q';
    }
  }
  return true;
}
int main() {
  cin >> n;
  a.resize(n);
  ans.resize(2 * n - 1, vector<char>(2 * n - 1, '.'));
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    for (int j = 0; j < n; j++) {
      if (a[i][j] == 'o') {
        fig.push_back(make_pair(i, j));
      }
    }
  }
  bool luck;
  for (int i = -n + 1; i < n; i++) {
    for (int j = -n + 1; j < n; j++) {
      if (check(i, j)) {
        setAns(i, j, 'x');
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (a[i][j] == 'x') {
        cout << "NO\n";
        return 0;
      }
    }
  }
  setAns(0, 0, 'o');
  cout << "YES\n";
  for (int i = 0; i < ans.size(); i++) {
    for (int j = 0; j < ans[i].size(); j++) {
      cout << ans[i][j];
    }
    cout << '\n';
  }
}
