#include <bits/stdc++.h>
using namespace std;
int n;
bool in_range(int x, int y) { return x >= 0 && y >= 0 && x < n && y < n; }
int main() {
  cin >> n;
  char grid[100][100];
  for (int i = 0; i < 2 * n; i++)
    for (int j = 0; j < 2 * n; j++) grid[i][j] = 'x';
  char g[51][51];
  bool vis[51][51] = {0};
  memset(vis, 0, sizeof vis);
  int c = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      cin >> g[i][j];
      if (g[i][j] == 'x') c++;
    }
  grid[n - 1][n - 1] = 'o';
  int x = n - 1, y = n - 1;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      if (g[i][j] != 'o') continue;
      for (int l = 0; l < n; l++)
        for (int k = 0; k < n; k++) {
          int xx = x + l, yy = y + k, px = i + l, py = j + k;
          if (in_range(px, py) && g[px][py] == '.') grid[xx][yy] = '.';
          xx = x + l, yy = y - k, px = i + l, py = j - k;
          if (in_range(px, py) && g[px][py] == '.') grid[xx][yy] = '.';
          xx = x - l, yy = y + k, px = i - l, py = j + k;
          if (in_range(px, py) && g[px][py] == '.') grid[xx][yy] = '.';
          xx = x - l, yy = y - k, px = i - l, py = j - k;
          if (in_range(px, py) && g[px][py] == '.') grid[xx][yy] = '.';
        }
    }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      if (g[i][j] != 'o') continue;
      for (int l = 0; l < n; l++)
        for (int k = 0; k < n; k++) {
          int xx = x + l, yy = y + k, px = i + l, py = j + k;
          if (in_range(px, py) && g[px][py] == '.' && grid[xx][yy] == 'x') {
            cout << "NO";
            return 0;
          }
          if (in_range(px, py) && g[px][py] == 'x' && grid[xx][yy] == 'x' &&
              !vis[px][py]) {
            c--;
            vis[px][py] = 1;
          }
          xx = x + l, yy = y - k, px = i + l, py = j - k;
          if (in_range(px, py) && g[px][py] == '.' && grid[xx][yy] == 'x') {
            cout << "NO";
            return 0;
          }
          if (in_range(px, py) && g[px][py] == 'x' && grid[xx][yy] == 'x' &&
              !vis[px][py]) {
            c--;
            vis[px][py] = 1;
          }
          xx = x - l, yy = y + k, px = i - l, py = j + k;
          if (in_range(px, py) && g[px][py] == '.' && grid[xx][yy] == 'x') {
            cout << "NO";
            return 0;
          }
          if (in_range(px, py) && g[px][py] == 'x' && grid[xx][yy] == 'x' &&
              !vis[px][py]) {
            c--;
            vis[px][py] = 1;
          }
          xx = x - l, yy = y - k, px = i - l, py = j - k;
          if (in_range(px, py) && g[px][py] == '.' && grid[xx][yy] == 'x') {
            cout << "NO";
            return 0;
          }
          if (in_range(px, py) && g[px][py] == 'x' && grid[xx][yy] == 'x' &&
              !vis[px][py]) {
            c--;
            vis[px][py] = 1;
          }
        }
    }
  if (c) {
    cout << "NO";
    return 0;
  }
  cout << "YES\n";
  for (int i = 0; i < 2 * n - 1; i++) {
    for (int j = 0; j < 2 * n - 1; j++) cout << grid[i][j];
    cout << endl;
  }
  return 0;
}
