#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<string> grid(N);
  for (int i = 0; i < N; i++) cin >> grid[i];
  vector<pair<int, int>> occupied, attacked;
  for (int i = 0; i < N; i++)
    for (int j = 0; j < N; j++)
      if (grid[i][j] == 'o') occupied.push_back(make_pair(i, j));
  set<pair<int, int>> moves;
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++) {
      if (grid[i][j] == '.') {
        for (int k = 0; k < (int)occupied.size(); k++) {
          int dx = i - occupied[k].first;
          int dy = j - occupied[k].second;
          moves.insert(make_pair(dx, dy));
        }
      }
    }
  }
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++) {
      if (grid[i][j] == 'x') {
        int cnt = 0;
        for (auto p : occupied) {
          int dx = i - p.first;
          int dy = j - p.second;
          if (moves.find(make_pair(dx, dy)) != moves.end()) cnt++;
        }
        if (cnt == (int)occupied.size()) {
          cout << "NO\n";
          return 0;
        }
      }
    }
  }
  cout << "YES\n";
  vector<string> answer(2 * N - 1);
  for (string &s : answer) s = string(2 * N - 1, 'x');
  int center = N - 1;
  for (auto p : moves) {
    answer[center + p.first][center + p.second] = '.';
  }
  answer[center][center] = 'o';
  for (auto s : answer) cout << s << endl;
  return 0;
}
