#include <bits/stdc++.h>
using namespace std;
int n;
string s[60];
char ans[200][200];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) cin >> s[i];
  for (int i = -(n - 1); i <= n - 1; i++)
    for (int j = -(n - 1); j <= n - 1; j++) {
      bool zero = false, one = false;
      for (int k = 0; k < n; k++)
        for (int l = 0; l < n; l++)
          if (s[k][l] == 'o' && k + i >= 0 && k + i < n && l + j >= 0 &&
              l + j < n) {
            if (s[k + i][l + j] == 'x') one = true;
            if (s[k + i][l + j] == '.') zero = true;
          }
      if (i == 0 && j == 0)
        ans[i + n - 1][j + n - 1] = 'o';
      else {
        if (one && !zero)
          ans[i + n - 1][j + n - 1] = 'x';
        else
          ans[i + n - 1][j + n - 1] = '.';
      }
    };
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      if (s[i][j] == 'x') {
        bool ok = false;
        for (int l = 0; l < 2 * n; l++)
          for (int k = 0; k < 2 * n; k++)
            if (ans[k][l] == 'x') {
              if (i - (k - n + 1) >= 0 && i - (k - n + 1) < n &&
                  j - (l - n + 1) >= 0 && j - (l - n + 1) < n &&
                  s[i - (k - n + 1)][j - (l - n + 1)] == 'o') {
                ok = true;
              }
            }
        if (!ok) {
          printf("NO\n");
          return 0;
        }
      }
  printf("YES\n");
  for (int i = 0; i < 2 * n; i++) printf("%s\n", ans[i]);
  return 0;
}
