#include <bits/stdc++.h>
using namespace std;
int n;
char s[100];
char ans[120][120];
char board[60][60];
int main() {
  scanf("%d %d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%s", &s);
    for (int j = 0; j < n; j++) {
      board[i][j] = s[j];
    }
  }
  for (int i = 0; i < 2 * n; i++) {
    for (int j = 0; j < 2 * n; j++) {
      ans[i][j] = 'x';
    }
  }
  ans[n - 1][n - 1] = 'o';
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (board[i][j] == '.') {
        for (int x = 0; x < n; x++) {
          for (int y = 0; y < n; y++) {
            if (board[x][y] == 'o') {
              int dx = i - x;
              int dy = j - y;
              ans[n - 1 + dx][n - 1 + dy] = '.';
            }
          }
        }
      }
    }
  }
  bool good = true;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (board[i][j] == 'x') {
        bool acc = false;
        for (int x = 0; x < n; x++) {
          for (int y = 0; y < n; y++) {
            if (board[x][y] == 'o') {
              int dx = i - x;
              int dy = j - y;
              if (ans[n - 1 + dx][n - 1 + dy] == 'x') acc = true;
            }
          }
        }
        if (!acc) good = false;
      }
    }
  }
  if (good) {
    printf("YES\n");
    for (int i = 0; i < 2 * n - 1; i++) {
      for (int j = 0; j < 2 * n - 1; j++) {
        printf("%c", ans[i][j]);
      }
      printf("\n");
    }
  } else {
    printf("NO\n");
  }
}
