#include <bits/stdc++.h>
using namespace std;
const int maxn = 50;
const int maxm = 2 * maxn - 1;
int n;
char board[maxn + 1][maxn + 1];
bool check[maxn + 1][maxn + 1];
vector<pair<int, int> > piece;
vector<pair<int, int> > underAttack;
vector<pair<int, int> > moves;
char final[maxm + 1][maxm + 1];
void read();
bool findMoves();
bool validMove(pair<int, int>);
bool validSquare(int, int);
void update(pair<int, int>);
void print();
int main() {
  read();
  if (!findMoves())
    cout << "NO" << endl;
  else
    print();
  return 0;
}
void read() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  pair<int, int> p;
  for (int r = 1; r <= n; r++) {
    p.first = r;
    for (int c = 1; c <= n; c++) {
      p.second = c;
      cin >> board[r][c];
      if (board[r][c] == 'x') underAttack.push_back(p);
      if (board[r][c] == 'o') piece.push_back(p);
    }
  }
}
bool findMoves() {
  vector<pair<int, int> >::iterator i = underAttack.begin();
  pair<int, int> move;
  while (i != underAttack.end()) {
    pair<int, int> p = *i;
    if (!check[p.first][p.second]) {
      vector<pair<int, int> >::iterator j = piece.begin();
      bool found = false;
      while (j != piece.end()) {
        pair<int, int> q = *j;
        move.first = p.first - q.first;
        move.second = p.second - q.second;
        if (validMove(move)) {
          moves.push_back(move);
          found = true;
          break;
        }
        j++;
      }
      if (!found) return false;
      update(move);
    }
    i++;
  }
  return true;
}
bool validMove(pair<int, int> move) {
  int dx = move.first;
  int dy = move.second;
  vector<pair<int, int> >::iterator it = piece.begin();
  while (it != piece.end()) {
    pair<int, int> p = *it;
    int r = p.first + dx;
    int c = p.second + dy;
    if (validSquare(r, c))
      if (board[r][c] == '.') return false;
    it++;
  }
  return true;
}
bool validSquare(int r, int c) { return (r > 0 && r <= n && c > 0 && c <= n); }
void update(pair<int, int> move) {
  int dx = move.first;
  int dy = move.second;
  vector<pair<int, int> >::iterator it = piece.begin();
  while (it != piece.end()) {
    pair<int, int> p = *it;
    int x = p.first + dx;
    int y = p.second + dy;
    if (validSquare(x, y)) check[x][y] = true;
    it++;
  }
}
void print() {
  cout << "YES" << endl;
  for (int i = 1; i < 2 * n; i++)
    for (int j = 1; j < 2 * n; j++) final[i][j] = '.';
  vector<pair<int, int> >::iterator it = moves.begin();
  while (it != moves.end()) {
    pair<int, int> p = *it;
    int dx = p.first;
    int dy = p.second;
    int x = n + dx;
    int y = n + dy;
    final[x][y] = 'x';
    it++;
  }
  final[n][n] = 'o';
  for (int i = 1; i < 2 * n; i++) {
    for (int j = 1; j < 2 * n; j++) cout << final[i][j];
    cout << endl;
  }
}
