#include <bits/stdc++.h>
using namespace std;
struct node {
  int x, y;
  node(int _a = 0, int _b = 0) : x(_a), y(_b) {}
  ~node() {}
  node operator+(const node &rhs) const { return node(x + rhs.x, y + rhs.y); }
  node operator-(const node &rhs) const { return node(x - rhs.x, y - rhs.y); }
};
char mmap[55][55];
char ans[105][105];
vector<node> ches;
vector<node> noattack;
vector<node> attack;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%s", mmap[i] + 1);
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (mmap[i][j] == 'o') {
        ches.push_back(node(i, j));
      } else if (mmap[i][j] == 'x') {
        attack.push_back(node(i, j));
      } else {
        noattack.push_back(node(i, j));
      }
    }
  }
  memset(ans, 0, sizeof(ans));
  ans[n][n] = 'o';
  for (int i = 0; i < noattack.size(); i++) {
    node &tar = noattack[i];
    for (int j = 0; j < ches.size(); j++) {
      node &pos = ches[j];
      ans[n + tar.x - pos.x][n + tar.y - pos.y] = '.';
    }
  }
  bool fail = false;
  for (int i = 0; i < attack.size(); i++) {
    node &tar = attack[i];
    bool check = false;
    for (int j = 0; j < ches.size(); j++) {
      node &pos = ches[j];
      if (ans[n + tar.x - pos.x][n + tar.y - pos.y] == '.') {
        continue;
      } else {
        ans[n + tar.x - pos.x][n + tar.y - pos.y] = 'x';
        check = true;
      }
    }
    if (check == false) {
      fail = true;
      break;
    }
  }
  for (int i = 1; i < n * 2; i++) {
    for (int j = 1; j < n * 2; j++) {
      if (ans[i][j] == 0) ans[i][j] = '.';
    }
  }
  if (fail == true) {
    printf("NO\n");
  } else {
    printf("YES\n");
    for (int i = 1; i < n * 2; i++) {
      ans[i][n * 2] = '\0';
    }
    for (int i = 1; i < n * 2; i++) {
      printf("%s\n", ans[i] + 1);
    }
  }
  return 0;
}
