#include <bits/stdc++.h>
using namespace std;
int n;
char a[55][55], b[55][55];
char res[105][105];
bool ok(int x, int y) {
  if (x <= 0 || y <= 0 || x > n || y > n) return false;
  return true;
}
int main() {
  scanf("%d", &n);
  bool have = false;
  for (int i = 1; i <= n; i++) {
    scanf("%s", a[i] + 1);
    for (int j = 1; j <= n; j++) {
      b[i][j] = '.';
      if (a[i][j] == 'x') have = true;
    }
  }
  for (int i = 1; i <= 2 * n - 1; i++) {
    for (int j = 1; j <= 2 * n - 1; j++) {
      res[i][j] = '.';
    }
  }
  if (!have) {
    res[n][n] = 'o';
    printf("YES\n");
    for (int i = 1; i <= 2 * n - 1; i++) {
      for (int j = 1; j <= 2 * n - 1; j++) {
        printf("%c", res[i][j]);
      }
      printf("\n");
    }
    return 0;
  }
  for (int i = 0; i <= n - 1; i++) {
    for (int j = 0; j <= n - 1; j++) {
      for (int t0 = -1; t0 <= 1; t0 += 2) {
        for (int t1 = -1; t1 <= 1; t1 += 2) {
          int dx = i * t0, dy = j * t1;
          have = false;
          for (int x = 1; x <= n; x++) {
            for (int y = 1; y <= n; y++) {
              if (a[x][y] != 'o') continue;
              if (!ok(x + dx, y + dy)) continue;
              if (a[x + dx][y + dy] == '.') {
                have = true;
                break;
              }
            }
          }
          if (!have) {
            res[n + dx][n + dy] = 'x';
            for (int x = 1; x <= n; x++) {
              for (int y = 1; y <= n; y++) {
                if (!ok(x + dx, y + dy)) continue;
                if (a[x][y] == 'o') b[x + dx][y + dy] = 'x';
              }
            }
          }
        }
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (a[i][j] == 'x' && b[i][j] == '.') {
        printf("NO\n");
        return 0;
      }
      if (a[i][j] == '.' && b[i][j] == 'x') {
        printf("NO\n");
        return 0;
      }
    }
  }
  printf("YES\n");
  res[n][n] = 'o';
  for (int i = 1; i <= 2 * n - 1; i++) {
    for (int j = 1; j <= 2 * n - 1; j++) {
      printf("%c", res[i][j]);
    }
    printf("\n");
  }
  return 0;
}
