#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n;
char a[105][105], b[105][105], c[105][105];
int sta(int x, int y) {
  if (x < 1 || y < 1 || x > n || y > n) return -1;
  if (a[x][y] == '.') return 0;
  if (a[x][y] == 'o') return 1;
  return 2;
}
bool check(int x, int y) {
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      if (sta(i, j) == 1) {
        c[i][j] = 'o';
        if (sta(i + x, j + y) == 0) return 0;
      }
  return 1;
}
void add(int x, int y) {
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      if (sta(i, j) == 1 && sta(i + x, j + y) != -1) c[i + x][j + y] = 'x';
}
int main() {
  n = read();
  for (int i = 1; i <= n; i++) scanf("%s", a[i] + 1);
  for (int i = 1; i <= 2 * n - 1; i++) {
    for (int j = 1; j <= 2 * n - 1; j++)
      if (i == n && j == n)
        b[i][j] = 'o';
      else if (check(i - n, j - n)) {
        b[i][j] = 'x';
        add(i - n, j - n);
      } else
        b[i][j] = '.';
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      if (a[i][j] == 'x' && a[i][j] != c[i][j]) {
        puts("NO");
        return 0;
      }
  puts("YES");
  for (int i = 1; i <= 2 * n - 1; i++) printf("%s\n", b[i] + 1);
  return 0;
}
