#include <bits/stdc++.h>
using namespace std;
char a[1000][1000];
char a1[1000][1000];
int n, m;
bool used[1000][1000];
bool used1[1000][1000];
int d[1000][1000];
void rec(int x, int y, int dx, int dy) {
  x += dx;
  y += dy;
  if (x < 0 || x > n || y < 0 || y > n) return;
  used[x][y] = 1;
}
void rec1(int x, int y, int dx, int dy) {
  x += dx;
  y += dy;
  if (x < 0 || x > m || y < 0 || y > m) return;
  used1[x][y] = 1;
  a1[x][y] = 'x';
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      cin >> a[i][j];
    }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      if (a[i][j] == 'o') {
        for (int i1 = 1; i1 <= n; i1++)
          for (int j1 = 1; j1 <= n; j1++) {
            if (a[i1][j1] == '.') d[i1 - i + 100][j1 - j + 100] = -1;
          }
      }
  d[100][100] = -1;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      if (a[i][j] == 'o') {
        for (int i1 = 0; i1 <= 200; i1++)
          for (int j1 = 0; j1 <= 200; j1++)
            if (d[i1][j1] == 0) rec(i, j, i1 - 100, j1 - 100);
      }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      if (!used[i][j] && a[i][j] == 'x') {
        cout << "NO";
        return 0;
      }
  cout << "YES\n";
  m = n + n - 1;
  int x = m / 2 + 1;
  int y = m / 2 + 1;
  a1[x][y] = 'o';
  used1[x][y] = 1;
  for (int i1 = 0; i1 <= 200; i1++)
    for (int j1 = 0; j1 <= 200; j1++)
      if (d[i1][j1] == 0) rec1(x, y, i1 - 100, j1 - 100);
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j <= m; j++) {
      if (!used1[i][j])
        cout << '.';
      else
        cout << a1[i][j];
    }
    cout << endl;
  }
}
