#include <bits/stdc++.h>
using namespace std;
int n;
string board[50];
vector<pair<int, int>> pieces, attack, moves;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> board[i];
    for (int j = 0; j < n; j++) {
      if (board[i][j] == 'o') pieces.push_back(make_pair(i, j));
      if (board[i][j] == 'x') attack.push_back(make_pair(i, j));
    }
  }
  for (auto sq : attack) {
    bool found = false;
    for (int i = 0; i < pieces.size(); i++) {
      int dx = sq.first - pieces[i].first;
      int dy = sq.second - pieces[i].second;
      bool fail = false;
      for (int j = 0; j < pieces.size(); j++) {
        if (i == j) continue;
        int x = pieces[j].first + dx;
        int y = pieces[j].second + dy;
        if (x >= 0 && x < n && y >= 0 && y < n && board[x][y] == '.') {
          fail = true;
          continue;
        }
      }
      if (!fail) {
        found = true;
        moves.push_back(make_pair(dx, dy));
        break;
      }
    }
    if (!found) {
      cout << "NO\n";
      return 0;
    }
  }
  char ans[2 * n - 1][2 * n - 1];
  for (int i = 0; i < 2 * n - 1; i++)
    for (int j = 0; j < 2 * n - 1; j++) ans[i][j] = '.';
  ans[n - 1][n - 1] = 'o';
  for (auto move : moves) {
    ans[n + move.first - 1][n + move.second - 1] = 'x';
  }
  cout << "YES\n";
  for (int i = 0; i < 2 * n - 1; i++) {
    for (int j = 0; j < 2 * n - 1; j++) cout << ans[i][j];
    cout << endl;
  }
}
