#include <bits/stdc++.h>
using namespace std;
char g[55][55];
bool ans[110][110];
bool f[55][55];
bool check_attack(int dx, int dy, vector<pair<int, int> >& vec, int n) {
  for (pair<int, int> tmp : vec) {
    int x = tmp.first + dx, y = tmp.second + dy;
    if (x >= 0 && x < n && y >= 0 && y < n && g[x][y] == '.') return 0;
  }
  return 1;
}
bool check_graph(vector<pair<int, int> >& vec, int n) {
  memset(f, 0, sizeof(f));
  for (int i = (1); i <= (2 * n - 1); ++i)
    for (int j = (1); j <= (2 * n - 1); ++j)
      if (ans[i][j]) {
        for (pair<int, int> tmp : vec) {
          int x = tmp.first + i - n, y = tmp.second + j - n;
          if (x >= 0 && x < n && y >= 0 && y < n) {
            f[x][y] = 1;
          }
        }
      }
  for (int i = 0; i < (n); ++i) {
    for (int j = 0; j < (n); ++j) {
      if ((g[i][j] == '.') && f[i][j]) return 0;
      if ((g[i][j] == 'x') && !f[i][j]) return 0;
    }
  }
  return 1;
}
int main() {
  int n;
  while (cin >> n) {
    memset(ans, 1, sizeof(ans));
    for (int i = 0; i < (n); ++i) scanf("%s", g[i]);
    vector<pair<int, int> > vec;
    for (int i = 0; i < (n); ++i)
      for (int j = 0; j < (n); ++j)
        if (g[i][j] == 'o') vec.push_back(pair<int, int>(i, j));
    for (int i = (1); i <= (2 * n - 1); ++i)
      for (int j = (1); j <= (2 * n - 1); ++j)
        ans[i][j] = check_attack(i - n, j - n, vec, n);
    if (!check_graph(vec, n))
      cout << "NO" << endl;
    else {
      cout << "YES" << endl;
      for (int i = (1); i <= (2 * n - 1); ++i) {
        for (int j = (1); j <= (2 * n - 1); ++j)
          if (i == n && j == n)
            putchar('o');
          else if (ans[i][j])
            putchar('x');
          else
            putchar('.');
        puts("");
      }
    }
  }
  return 0;
}
