#include <bits/stdc++.h>
using namespace std;
const int N = 50;
int n;
char t[N][N + 1];
char r[2 * N - 1][2 * N];
bool f(int k, int l) {
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      if (t[i][j] == 'o')
        if (r[n - 1 + (k - i)][n - 1 + (l - j)] == 'x') return true;
  return false;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) scanf("%s", t[i]);
  for (int i = 0; i < 2 * n - 1; i++)
    for (int j = 0; j < 2 * n - 1; j++) r[i][j] = 'x';
  r[n - 1][n - 1] = 'o';
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      if (t[i][j] == 'o')
        for (int k = 0; k < n; k++)
          for (int l = 0; l < n; l++)
            if (t[k][l] == '.') r[n - 1 + (k - i)][n - 1 + (l - j)] = '.';
  for (int k = 0; k < n; k++)
    for (int l = 0; l < n; l++)
      if (t[k][l] == 'x')
        if (!f(k, l)) {
          cout << "NO\n";
          return 0;
        }
  cout << "YES\n";
  for (int i = 0; i < 2 * n - 1; i++) printf("%s\n", r[i]);
  return 0;
}
