#include <bits/stdc++.h>
using namespace std;
char g[66][66];
vector<pair<int, int>> d, p;
char ans[111][111];
bool f[66][66];
int n;
bool test(int x, int y) {
  for (auto i : p) {
    int tx = x + i.first;
    int ty = y + i.second;
    if (tx < 1 || tx > n || ty < 1 || ty > n) continue;
    if (g[tx][ty] == '.') return false;
  }
  for (auto i : p) {
    int tx = x + i.first;
    int ty = y + i.second;
    if (tx < 1 || tx > n || ty < 1 || ty > n) continue;
    f[tx][ty] = 1;
  }
  return true;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> g[i] + 1;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j)
      if (g[i][j] == 'o') p.push_back(make_pair(i, j));
  for (int i = -n; i <= n; ++i)
    for (int j = -n; j <= n; ++j)
      if (test(i, j)) d.push_back(make_pair(i, j));
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j)
      if (g[i][j] == 'x' && !f[i][j]) return puts("NO");
  puts("YES");
  memset(ans, '.', sizeof ans);
  for (auto i : d) ans[i.first + n][i.second + n] = 'x';
  ans[n][n] = 'o';
  for (int i = 1; i <= 2 * n - 1; ++i) {
    for (int j = 1; j <= 2 * n - 1; ++j) cout << ans[i][j];
    cout << endl;
  }
}
