#include <bits/stdc++.h>
using namespace std;
class TaskD {
 public:
  void solve(istream& in, ostream& out) {
    int n;
    in >> n;
    vector<string> s(n);
    vector<string> ans(2 * n - 1, string(2 * n - 1, '.'));
    ans[n - 1][n - 1] = 'o';
    vector<pair<int, int> > o;
    for (int i = 0; i < n; ++i) {
      in >> s[i];
      for (int j = 0; j < n; ++j) {
        if (s[i][j] == 'o') o.push_back(make_pair(i, j));
      }
    }
    for (int dx = -n + 1; dx < n; ++dx) {
      for (int dy = -n + 1; dy < n; ++dy) {
        if (!dx && !dy) continue;
        bool ok = true;
        for (int k = 0; k < o.size(); ++k) {
          int x = o[k].first + dx, y = o[k].second + dy;
          if (x > -1 && y > -1 && x < n && y < n && s[x][y] == '.') {
            ok = false;
            break;
          }
        }
        if (ok) {
          ans[n - 1 + dx][n - 1 + dy] = 'x';
          for (int k = 0; k < o.size(); ++k) {
            int x = o[k].first + dx, y = o[k].second + dy;
            if (x > -1 && y > -1 && x < n && y < n && s[x][y] == 'x')
              s[x][y] = 'X';
          }
        }
      }
    }
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < n; ++j)
        if (s[i][j] == 'x') {
          out << "NO" << endl;
          return;
        }
    }
    out << "YES" << endl;
    for (int i = 0; i < 2 * n - 1; ++i) {
      out << ans[i] << endl;
    }
  }
};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  TaskD solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}
