#include <bits/stdc++.h>
using namespace std;
struct point {
  int x;
  int y;
  point(int Y, int X) {
    x = X;
    y = Y;
  }
};
int main() {
  int n;
  cin >> n;
  vector<vector<char> > map(n, vector<char>(n)), tmp(n, vector<char>(n, '.'));
  vector<point> figure;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> map[i][j];
      if (map[i][j] == 'o') figure.push_back(point(i, j));
    }
  }
  int m = 2 * n - 1;
  int r = n - 1;
  vector<vector<char> > res(m, vector<char>(m, '.'));
  vector<point> ans;
  res[r][r] = 'o';
  for (int i = -n + 1; i < n; i++) {
    for (int j = -n + 1; j < n; j++) {
      bool ok = true;
      for (int h = 0; h < figure.size(); h++) {
        int dx = figure[h].x + j;
        int dy = figure[h].y + i;
        if (dx >= 0 && dx < n && dy >= 0 && dy < n && map[dy][dx] == '.')
          ok = false;
      }
      if (ok) {
        ans.push_back(point(i, j));
      }
    }
  }
  for (int i = 0; i < ans.size(); i++) {
    res[r + ans[i].y][r + ans[i].x] = 'x';
  }
  for (int i = 0; i < figure.size(); i++) {
    for (int j = 0; j < ans.size(); j++) {
      if (figure[i].x + ans[j].x >= 0 && figure[i].x + ans[j].x < n &&
          figure[i].y + ans[j].y >= 0 && figure[i].y + ans[j].y < n)
        tmp[figure[i].y + ans[j].y][figure[i].x + ans[j].x] = 'x';
    }
  }
  bool yes = true;
  for (int i = 0; i < n && yes; i++) {
    for (int j = 0; j < n && yes; j++) {
      if (map[i][j] == 'x' && tmp[i][j] == '.') {
        yes = false;
        break;
      }
    }
  }
  if (yes) {
    res[r][r] = 'o';
    cout << "YES" << endl;
    for (int i = 0; i < m; i++) {
      for (int j = 0; j < m; j++) {
        cout << res[i][j];
      }
      cout << endl;
    }
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
