#include <bits/stdc++.h>
using namespace std;
char a[55][55], ans[105][105];
bool underAttack[55][55];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> a[i][j];
    }
  }
  vector<pair<int, int> > possibleMoves;
  memset(underAttack, false, sizeof(underAttack));
  for (int x = -n + 1; x <= n - 1; x++) {
    for (int y = -n + 1; y <= n - 1; y++) {
      if (x == 0 && y == 0) continue;
      bool flg = true;
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
          if (a[i][j] == 'o') {
            if (0 <= i + x && i + x < n && 0 <= j + y && j + y < n &&
                a[i + x][j + y] == '.') {
              flg = false;
              break;
            }
          }
        }
        if (!flg) break;
      }
      if (flg) {
        possibleMoves.emplace_back(x, y);
        for (int i = 0; i < n; i++) {
          for (int j = 0; j < n; j++) {
            if (a[i][j] == 'o') {
              if (0 <= i + x && i + x < n && 0 <= j + y && j + y < n) {
                underAttack[i + x][j + y] = true;
              }
            }
          }
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (a[i][j] == 'x' && !underAttack[i][j]) {
        cout << "NO" << '\n';
        exit(0);
      }
    }
  }
  for (int i = -n + 1; i <= n - 1; i++) {
    for (int j = -n + 1; j <= n - 1; j++) {
      ans[i + n][j + n] = '.';
    }
  }
  ans[n][n] = 'o';
  for (auto x : possibleMoves) {
    ans[n + x.first][n + x.second] = 'x';
  }
  cout << "YES" << '\n';
  for (int i = -n + 1; i <= n - 1; i++) {
    for (int j = -n + 1; j <= n - 1; j++) {
      cout << ans[i + n][j + n];
    }
    cout << '\n';
  }
  return 0;
}
