#include <bits/stdc++.h>
using namespace std;
const int middle = 64;
int n;
char board[64][64];
char ans[128][128];
bool checked[64][64];
int sa, sb;
vector<pair<int, int> > a, b;
int main() {
  memset(ans, '.', sizeof(ans));
  memset(checked, false, sizeof(checked));
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%s", board[i]);
    for (int j = 0; j < n; j++) {
      if (board[i][j] == 'o') {
        a.push_back(make_pair(i, j));
      }
      if (board[i][j] == 'x') {
        b.push_back(make_pair(i, j));
      }
    }
  }
  sa = a.size();
  sb = b.size();
  for (int i = 0; i < sa; i++) {
    for (int j = 0; j < sb; j++) {
      pair<int, int> dif =
          make_pair(b[j].first - a[i].first, b[j].second - a[i].second);
      ans[dif.first + middle][dif.second + middle] = 'x';
    }
  }
  for (int i = 0; i < sa; i++) {
    for (int x = 0; x < n; x++) {
      for (int y = 0; y < n; y++) {
        pair<int, int> p = make_pair(x - a[i].first, y - a[i].second);
        if ((board[x][y] == '.') and
            ans[p.first + middle][p.second + middle] == 'x') {
          ans[p.first + middle][p.second + middle] = '.';
        }
      }
    }
  }
  int count = 0;
  for (int i = 0; i < sa; i++) {
    for (int x = 0; x < n; x++) {
      for (int y = 0; y < n; y++) {
        pair<int, int> p = make_pair(x - a[i].first, y - a[i].second);
        if ((board[x][y] == 'x') and
            ans[p.first + middle][p.second + middle] == 'x') {
          count += !checked[x][y];
          checked[x][y] = true;
        }
      }
    }
  }
  if (count < sb) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
  ans[middle][middle] = 'o';
  for (int i = middle - n + 1; i < middle + n; i++) {
    ans[i][middle + n] = 0;
    printf("%s\n", ans[i] + (middle - n + 1));
  }
}
