#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int SIZE = 1e3 + 10;
char s[SIZE][SIZE], an[SIZE][SIZE];
int cnt[SIZE][SIZE], n;
vector<pair<int, int> > me, you;
bool Out(int x, int y) { return x < 0 || y < 0 || x >= n || y >= n; }
int main() {
  scanf("%d", &(n));
  for (int i = 0; i < (n); ++i) scanf("%s", (s[i]));
  for (int i = 0; i < (n); ++i)
    for (int j = 0; j < (n); ++j) {
      if (s[i][j] == 'o') {
        me.push_back(make_pair(i, j));
        you.push_back(make_pair(i, j));
      } else if (s[i][j] == 'x') {
        you.push_back(make_pair(i, j));
      }
    }
  for (int i = (-n); i < (2 * n); ++i)
    for (int j = (-n); j < (2 * n); ++j)
      if (Out(i, j)) you.push_back(make_pair(i, j));
  for (int i = 0; i < (n * 2 - 1); ++i)
    for (int j = 0; j < (n * 2 - 1); ++j) an[i][j] = '.';
  an[n - 1][n - 1] = 'o';
  for (int i = 0; i < (((int)(me).size())); ++i)
    for (int j = 0; j < (((int)(you).size())); ++j) {
      if (me[i] == you[j]) continue;
      if (!Out(abs(you[j].first - me[i].first),
               abs(you[j].second - me[i].second)))
        cnt[n - 1 + you[j].first - me[i].first]
           [n - 1 + you[j].second - me[i].second]++;
    }
  for (int i = 0; i < (2 * n); ++i)
    for (int j = 0; j < (2 * n); ++j) {
      if (cnt[i][j] == ((int)(me).size())) {
        an[i][j] = 'x';
        for (int k = 0; k < (((int)(me).size())); ++k)
          if (!Out(me[k].first + i - (n - 1), me[k].second + j - (n - 1))) {
            s[me[k].first + i - (n - 1)][me[k].second + j - (n - 1)] = 'o';
          }
      }
    }
  for (int i = 0; i < (n); ++i)
    for (int j = 0; j < (n); ++j)
      if (s[i][j] == 'x') {
        puts("NO");
        return 0;
      }
  puts("YES");
  for (int i = 0; i < (n * 2 - 1); ++i) puts(an[i]);
  return 0;
}
