#include <bits/stdc++.h>
using namespace std;
const int maxn = 50 + 5;
int n, vis[maxn][maxn];
char grid[maxn][maxn], ans[maxn * 2][maxn * 2];
vector<pair<int, int> > circle;
bool check(int dx, int dy) {
  for (pair<int, int>& now : circle) {
    int nx = now.first + dx, ny = now.second + dy;
    if (nx < 0 || nx >= n || ny < 0 || ny >= n) continue;
    if (grid[nx][ny] == '.') {
      for (pair<int, int>& bad : circle) {
        if (bad.first == now.first && bad.second == now.second) break;
        nx = bad.first + dx, ny = bad.second + dy;
        if (nx < 0 || nx >= n || ny < 0 || ny >= n) continue;
        vis[nx][ny]--;
      }
      return 0;
    } else
      vis[nx][ny]++;
  }
  return 1;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%s", grid[i]);
    for (int j = 0; j < n; j++)
      if (grid[i][j] == 'o') circle.push_back(make_pair(i, j));
  }
  for (int i = 0; i < 2 * n - 1; ans[i][2 * n - 1] = '\0', i++)
    for (int j = 0; j < 2 * n - 1; j++)
      if (check(i - n + 1, j - n + 1))
        ans[i][j] = 'x';
      else
        ans[i][j] = '.';
  ans[n - 1][n - 1] = 'o';
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      if (grid[i][j] == 'x' && !vis[i][j]) {
        printf("NO\n");
        return 0;
      }
  printf("YES\n");
  for (int i = 0; i < 2 * n - 1; i++) printf("%s\n", ans[i]);
}
