#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100;
int n;
char a[MAXN][MAXN];
bool used[MAXN][MAXN], ans[2 * MAXN][2 * MAXN];
bool valid(int x, int y) { return 0 <= x && x < n && 0 <= y && y < n; }
bool check(int dx, int dy) {
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (a[i][j] == 'o' && valid(i + dx, j + dy) && a[i + dx][j + dy] == '.') {
        return false;
      }
    }
  }
  return true;
}
void attack(int dx, int dy) {
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (a[i][j] == 'o' && valid(i + dx, j + dy) && a[i + dx][j + dy] == 'x') {
        used[i + dx][j + dy] = true;
      }
    }
  }
}
void solve() {
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      scanf(" %c", &a[i][j]);
    }
  }
  memset(used, 0, sizeof(used));
  memset(ans, 0, sizeof(ans));
  for (int dx = -n + 1; dx <= n - 1; ++dx) {
    for (int dy = -n + 1; dy <= n - 1; ++dy) {
      if (check(dx, dy)) {
        ans[dx + n - 1][dy + n - 1] = true;
        attack(dx, dy);
      }
    }
  }
  bool ok = true;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (a[i][j] == 'x' && !used[i][j]) {
        ok = false;
        break;
      }
    }
    if (!ok) {
      break;
    }
  }
  if (ok) {
    printf("YES\n");
    for (int i = 0; i < 2 * n - 1; ++i) {
      for (int j = 0; j < 2 * n - 1; ++j) {
        if (i == n - 1 && j == n - 1) {
          printf("o");
          continue;
        }
        if (ans[i][j]) {
          printf("x");
        } else {
          printf(".");
        }
      }
      printf("\n");
    }
  } else {
    printf("NO\n");
  }
}
int main() {
  while (scanf("%d\n", &n) == 1) {
    solve();
  }
  return 0;
}
