#include <bits/stdc++.h>
template <typename T>
using Vector2D = std::vector<std::vector<T>>;
using PairInt = std::pair<int, int>;
using MapInt = std::map<int, int>;
using UMapIntString = std::unordered_map<int, std::string>;
using SetInt = std::set<int>;
using VectorInt = std::vector<int>;
using VectorInt2D = Vector2D<int>;
using VectorInt64 = std::vector<int64_t>;
using VectorChar = std::vector<char>;
using VectorChar2D = Vector2D<char>;
using VectorString = std::vector<std::string>;
using QueuePairInt = std::queue<PairInt>;
using QueueInt = std::queue<int>;
using PairInt = std::pair<int, int>;
using VectorPairInt = std::vector<PairInt>;
using SetInt = std::set<int>;
using UMapChar = std::map<char, int>;
using ListInt = std::list<int>;
using VectorListInt = std::vector<ListInt>;
using VectorDouble = std::vector<double>;
void updateSteps(VectorInt2D& steps, VectorString& board, int bi, int bj) {
  int n = board.size();
  int ansSz = 2 * n - 1;
  for (int i = 0; i < ansSz; ++i) {
    for (int j = 0; j < ansSz; ++j) {
      int di = i - ansSz / 2;
      int dj = j - ansSz / 2;
      int ii = bi + di;
      int jj = bj + dj;
      if ((di != 0 || dj != 0) &&
          (ii < 0 || ii >= n || jj < 0 || jj >= n || board[ii][jj] == 'x' ||
           board[ii][jj] == 'o')) {
        ++steps[i][j];
      }
    }
  }
}
int main() {
  std::ios::sync_with_stdio(false);
  int n;
  std::cin >> n;
  VectorString board(n);
  for (int i = 0; i < n; ++i) {
    std::cin >> board[i];
  }
  int ansSz = 2 * n - 1;
  VectorInt2D steps(ansSz, VectorInt(ansSz, 0));
  int cnt = 0;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (board[i][j] == 'o') {
        ++cnt;
        updateSteps(steps, board, i, j);
      }
    }
  }
  VectorString ans(ansSz, std::string(ansSz, '.'));
  ans[ansSz / 2][ansSz / 2] = 'o';
  VectorPairInt avail;
  avail.reserve(ansSz * ansSz);
  for (int i = 0; i < ansSz; ++i) {
    for (int j = 0; j < ansSz; ++j) {
      if (steps[i][j] == cnt) {
        ans[i][j] = 'x';
        avail.push_back({i - ansSz / 2, j - ansSz / 2});
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (board[i][j] == 'o') {
        for (const PairInt& s : avail) {
          int ii = i + s.first;
          int jj = j + s.second;
          if (ii >= 0 && ii < n && jj >= 0 && jj < n && board[ii][jj] == 'x') {
            board[ii][jj] = '.';
          }
        }
      }
    }
  }
  bool isYes = true;
  for (int i = 0; isYes && i < n; ++i) {
    for (int j = 0; isYes && j < n; ++j) {
      isYes = (board[i][j] != 'x');
    }
  }
  if (isYes) {
    std::cout << "YES\n";
    for (int i = 0; i < ansSz; ++i) {
      std::cout << ans[i] << "\n";
    }
  } else {
    std::cout << "NO";
  }
  return 0;
}
