#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > piece;
int n;
bool mark[60][60];
bool isIn(int x, int y) {
  if (x < 0 || x >= n || y < 0 || y >= n) return false;
  return true;
}
int main() {
  cin >> n;
  string s[60];
  vector<pair<int, int> > ans;
  int tahdids = 0;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    for (int j = 0; j < n; j++) {
      if (s[i][j] == 'o') piece.push_back(make_pair(j, i));
      if (s[i][j] == 'x') tahdids++;
    }
  }
  for (int dx = -n + 1; dx < n; dx++)
    for (int dy = -n + 1; dy < n; dy++) {
      if (dx == 0 && dy == 0) continue;
      bool flag = false;
      for (int i = 0; i < piece.size(); i++) {
        pair<int, int> now = piece[i];
        int x = now.first, y = now.second;
        if ((isIn(x + dx, y + dy) && s[y + dy][x + dx] == '.')) {
          flag = true;
          break;
        }
      }
      if (!flag) ans.push_back(make_pair(dx, dy));
    }
  int tempTah = 0;
  for (int i = 0; i < ans.size(); i++)
    for (int j = 0; j < piece.size(); j++) {
      pair<int, int> now = piece[j];
      int x = now.first, y = now.second;
      int dx = ans[i].first, dy = ans[i].second;
      if (isIn(x + dx, y + dy) && s[y + dy][x + dx] == 'x')
        mark[y + dy][x + dx] = true;
    }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      if (mark[i][j]) tempTah++;
  if (tempTah < tahdids) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  string javab[120];
  for (int i = 0; i < 2 * n - 1; i++)
    for (int j = 0; j < 2 * n - 1; j++) javab[i] += '.';
  javab[n - 1][n - 1] = 'o';
  for (int i = 0; i < ans.size(); i++)
    javab[n - 1 + ans[i].second][n - 1 + ans[i].first] = 'x';
  for (int i = 0; i < 2 * n - 1; i++) cout << javab[i] << endl;
  return 0;
}
