#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > pieces;
vector<pair<int, int> > dots;
const int MAXN = 55;
const int off = MAXN;
int N;
char grid[MAXN][MAXN];
int bio[2 * MAXN][2 * MAXN];
char ans[2 * MAXN][2 * MAXN];
int flag[MAXN][MAXN];
bool check() {
  memset(flag, 0, sizeof flag);
  for (int i = 1; i < 2 * N; ++i)
    for (int j = 1; j < 2 * N; ++j) {
      if (ans[i][j] == '.') continue;
      int dx = i - N, dy = j - N;
      for (auto a : pieces) {
        int nx = a.first + dx;
        int ny = a.second + dy;
        if (nx < 0 || ny < 0 || nx >= N || ny >= N) continue;
        flag[nx][ny] = 1;
      }
    }
  for (int i = 0; i < N; ++i) {
    for (int j = 0; j < N; ++j) {
      if (flag[i][j] == 1 && grid[i][j] == '.') return false;
      if (flag[i][j] == 0 && grid[i][j] != '.') return false;
    }
  }
  return true;
}
int main(void) {
  scanf("%d", &N);
  for (int i = 0; i < N; ++i) {
    scanf("%s", grid[i]);
    for (int j = 0; j < N; ++j) {
      if (grid[i][j] == 'o') pieces.push_back({i, j});
      if (grid[i][j] == '.') dots.push_back({i, j});
    }
  }
  int n = N - 1;
  for (auto a : pieces) {
    for (auto b : dots) {
      bio[N + b.first - a.first][N + b.second - a.second] = 1;
    }
  }
  for (int i = 1; i < 2 * N; ++i)
    for (int j = 1; j < 2 * N; ++j) {
      if (!bio[i][j])
        ans[i][j] = 'x';
      else
        ans[i][j] = '.';
    }
  ans[N][N] = 'o';
  if (!check())
    printf("NO\n");
  else {
    printf("YES\n");
    for (int i = 1; i < 2 * N; ++i) {
      for (int j = 1; j < 2 * N; ++j) printf("%c", ans[i][j]);
      printf("\n");
    }
  }
  return 0;
}
