#include <bits/stdc++.h>
char ch;
void read(char &a) {
  a = 0;
  ch = getchar();
  while (!(ch == '.' || ch == 'o' || ch == 'x')) ch = getchar();
  a = ch;
}
struct Point {
  int x, y;
  Point(int x = 0, int y = 0) : x(x), y(y){};
} list[2600], X[2600];
int n, m, size, tot, ans[110][110], use[2600], id[55][55];
char map[55][55];
int can(int a, int b) {
  int dx = X[a].x - list[b].x;
  int dy = X[a].y - list[b].y;
  if (ans[n + dx][n + dy] == 1) return 1;
  if (ans[n + dx][n + dy] == 2) return 0;
  for (int i = 1; i <= size; i++) {
    int x = list[i].x + dx, y = list[i].y + dy;
    if ((x >= 1 && x <= n && y >= 1 && y <= n) && map[x][y] == '.') {
      ans[n + dx][n + dy] = 2;
      return 0;
    }
  }
  ans[n + dx][n + dy] = 1;
  for (int i = 1; i <= size; i++) {
    int x = list[i].x + dx, y = list[i].y + dy;
    if ((x >= 1 && x <= n && y >= 1 && y <= n) && map[x][y] == 'x')
      use[id[x][y]] = 1;
  }
  return 1;
}
void solve() {
  for (int i = 1; i <= tot; i++)
    if (!use[i]) {
      for (int j = 1; j <= size; j++) {
        if (can(i, j)) break;
        if (j == size) {
          printf("NO\n");
          return;
        }
      }
    }
  printf("YES\n");
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j <= m; j++) {
      if (i == n && j == n)
        printf("o");
      else if (ans[i][j] == 1)
        printf("x");
      else
        printf(".");
    }
    printf("\n");
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      read(map[i][j]);
      if (map[i][j] == 'o') {
        list[++size].x = i;
        list[size].y = j;
      } else if (map[i][j] == 'x') {
        X[++tot].x = i;
        X[tot].y = j;
        id[i][j] = tot;
      }
    }
  m = n + n - 1;
  solve();
  return 0;
}
