#include <bits/stdc++.h>
using namespace std;
int abs(int a) {
  if (a < 0) return -a;
  return a;
}
int main() {
  int n;
  cin >> n;
  char t[n][n], sol[2 * n - 1][2 * n - 1];
  vector<pair<int, int> > s;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      cin >> t[i][j];
      if (t[i][j] == 'o') s.push_back(make_pair(i, j));
    }
  for (int i = 0; i < 2 * n - 1; i++)
    for (int j = 0; j < 2 * n - 1; j++) sol[i][j] = 'x';
  sol[n - 1][n - 1] = 'o';
  for (int p = 0; p < s.size(); p++)
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++)
        if (t[i][j] == '.')
          sol[n - 1 + i - s[p].first][n - 1 + j - s[p].second] = '.';
  for (int i = 0; i < 2 * n - 1; i++)
    for (int j = 0; j < 2 * n - 1; j++)
      if (sol[i][j] != '.')
        for (int p = 0; p < s.size(); p++)
          if (s[p].first - n + 1 + i >= 0 and s[p].first - n + 1 + i < n and
              s[p].second - n + 1 + j >= 0 and s[p].second - n + 1 + j < n) {
            if (t[s[p].first - n + 1 + i][s[p].second - n + 1 + j] == '.') {
              cout << "NO" << endl;
              return 0;
            } else
              t[s[p].first - n + 1 + i][s[p].second - n + 1 + j] = 'j';
          }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      if (t[i][j] == 'x') {
        cout << "NO" << endl;
        return 0;
      }
  cout << "YES" << endl;
  for (int i = 0; i < 2 * n - 1; i++) {
    for (int j = 0; j < 2 * n - 1; j++) cout << sol[i][j];
    cout << endl;
  }
}
