#include <bits/stdc++.h>
using namespace std;
int n, xs = 0;
char b[50][50], ans[99][99];
int main() {
  ios::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < 2 * n - 1; ++i)
    for (int j = 0; j < 2 * n - 1; ++j) ans[i][j] = '.';
  ans[n - 1][n - 1] = 'o';
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j) {
      cin >> b[i][j];
      if (b[i][j] == 'x') ++xs;
    }
  for (int dx = 1 - n; dx < n; ++dx)
    for (int dy = 1 - n; dy < n; ++dy)
      if (dx != 0 || dy != 0) {
        bool valid = true;
        for (int i = 0; i < n; ++i)
          for (int j = 0; j < n; ++j)
            if (b[i][j] == 'o' && 0 <= i + dx && i + dx < n && 0 <= j + dy &&
                j + dy < n && b[i + dx][j + dy] == '.')
              valid = false;
        if (valid) {
          ans[n - 1 + dx][n - 1 + dy] = 'x';
          for (int i = 0; i < n; ++i)
            for (int j = 0; j < n; ++j)
              if (b[i][j] == 'o' && 0 <= i + dx && i + dx < n && 0 <= j + dy &&
                  j + dy < n && b[i + dx][j + dy] == 'x')
                b[i + dx][j + dy] = '?', --xs;
        }
      }
  if (xs)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (int i = 0; i < 2 * n - 1; ++i) {
      for (int j = 0; j < 2 * n - 1; ++j) cout << ans[i][j];
      cout << endl;
    }
  }
}
