#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const* argv[]) {
  int n;
  cin >> n;
  string* arr = new string[n];
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
  }
  string* re = new string[2 * n - 1];
  string* ans = new string[2 * n - 1];
  for (int i = 0; i < 2 * n - 1; i++) {
    string str;
    for (int j = 0; j < 2 * n - 1; j++) {
      str += 'x';
    }
    ans[i] = str;
  }
  for (int i = 0; i < 2 * n - 1; i++) {
    string str;
    for (int j = 0; j < 2 * n - 1; j++) {
      str += '.';
    }
    re[i] = str;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; ++j) {
      if (arr[i][j] == 'o') {
        for (int ii = 0; ii < n; ii++) {
          for (int jj = 0; jj < n; ++jj) {
            if (arr[ii][jj] == '.') {
              ans[ii - i + n - 1][jj - j + n - 1] = '.';
            }
          }
        }
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (arr[i][j] == 'o') {
        re[i][j] = 'o';
        for (int ii = 0; ii < 2 * n - 1; ii++) {
          for (int jj = 0; jj < 2 * n - 1; jj++) {
            if (ans[ii][jj] == 'x') {
              int ti = i + ii - n + 1;
              int tj = j + jj - n + 1;
              if (ti >= 0 && ti < n && tj >= 0 && tj < n &&
                  arr[ti][tj] != 'o') {
                re[ti][tj] = 'x';
              }
            }
          }
        }
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (arr[i][j] != re[i][j]) {
        cout << "NO" << endl;
        return 0;
      }
    }
  }
  cout << "YES" << endl;
  ans[n - 1][n - 1] = 'o';
  for (int i = 0; i < 2 * n - 1; i++) {
    cout << ans[i] << endl;
  }
  delete[] arr;
  delete[] ans;
  return 0;
}
