#include <bits/stdc++.h>
using namespace std;
const int maxn = 50;
char arr[maxn + 1][maxn + 1];
char narr[maxn + 1][maxn + 1];
int b[maxn * maxn + 1][2 * maxn + 1][2 * maxn + 1];
int n;
bool valid(int y, int x) { return y >= 1 && y <= n && x >= 1 && x <= n; }
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j) cin >> arr[i][j];
  int len = 0;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j) {
      if (arr[i][j] != 'o') continue;
      ++len;
      for (int c = -(n - 1); c <= n - 1; ++c)
        for (int d = -(n - 1); d <= n - 1; ++d) {
          if (!valid(i + c, j + d))
            b[len][c + n][d + n] = 1;
          else if (arr[i + c][j + d] != '.')
            b[len][c + n][d + n] = 1;
        }
    }
  for (int i = 2; i <= len; ++i)
    for (int c = 1; c <= 2 * n - 1; ++c)
      for (int d = 1; d <= 2 * n - 1; ++d) b[1][c][d] &= b[i][c][d];
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j) {
      if (arr[i][j] != 'o') continue;
      for (int c = -(n - 1); c <= n - 1; ++c)
        for (int d = -(n - 1); d <= n - 1; ++d) {
          if (!valid(i + c, j + d)) continue;
          if (b[1][c + n][d + n]) narr[i + c][j + d] = 1;
        }
    }
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j)
      if ((narr[i][j] == 1 && arr[i][j] == '.') ||
          (narr[i][j] == 0 && arr[i][j] != '.')) {
        cout << "NO" << endl;
        return 0;
      }
  cout << "YES" << endl;
  for (int i = -(n - 1); i <= n - 1; ++i) {
    for (int j = -(n - 1); j <= n - 1; ++j) {
      if (i == 0 && j == 0)
        cout << 'o';
      else
        cout << (b[1][i + n][j + n] ? 'x' : '.');
    }
    cout << endl;
  }
  return 0;
}
