#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
  std::ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<string> data(n);
  for (int i = 0; i < data.size(); ++i) {
    cin >> data[i];
  }
  vector<string> data2(3 * n - 2, string(3 * n - 2, 'x'));
  for (int i = 0; i < data.size(); ++i)
    for (int j = 0; j < data.size(); ++j)
      data2[i + n - 1][j + n - 1] = data[i][j];
  vector<vector<pair<short, short>>> m;
  for (int i = 0; i < data2.size(); ++i)
    for (int j = 0; j < data2.size(); ++j)
      if (data2[i][j] == 'o') {
        vector<pair<short, short>> s;
        s.reserve(data2.size());
        for (int i2 = 0; i2 < data2.size(); ++i2)
          for (int j2 = 0; j2 < data2.size(); ++j2)
            if (data2[i2][j2] != '.') {
              s.push_back({i2 - i, j2 - j});
            }
        m.push_back(s);
      }
  vector<pair<short, short>> res = m[0];
  sort(res.begin(), res.end());
  vector<pair<short, short>> newRes;
  for (int i = 1; i < m.size(); ++i) {
    newRes.clear();
    sort(m[i].begin(), m[i].end());
    set_intersection(res.begin(), res.end(), m[i].begin(), m[i].end(),
                     back_inserter(newRes));
    swap(newRes, res);
  }
  for (int i = 0; i < data.size(); ++i)
    for (int j = 0; j < data.size(); ++j)
      if (data[i][j] == 'o') {
        for (auto k = res.begin(); k != res.end(); ++k) {
          int px = i + k->first;
          int py = j + k->second;
          if (px >= 0 && px < data.size())
            if (py >= 0 && py < data.size()) {
              if (data[px][py] == 'x') {
                data[px][py] = '.';
              }
            }
        }
      }
  for (int i = 0; i < data.size(); ++i)
    for (int j = 0; j < data.size(); ++j)
      if (data[i][j] == 'x') {
        cout << "NO" << endl;
        return 0;
      }
  vector<string> p(2 * n - 1, string(2 * n - 1, '.'));
  cout << "YES" << endl;
  for (auto k = res.begin(); k != res.end(); ++k) {
    int px = n - 1 + k->first;
    int py = n - 1 + k->second;
    if (px >= 0 && px < p.size())
      if (py >= 0 && py < p.size()) {
        p[px][py] = 'x';
      }
  }
  p[n - 1][n - 1] = 'o';
  for (int i = 0; i < p.size(); ++i) {
    cout << p[i] << endl;
  }
  return 0;
}
