#include <bits/stdc++.h>
using namespace std;
const int maxn = 10010;
char str[maxn][20];
void solve(int n) {
  int ok = 0;
  for (int i = 1; i <= n; ++i) {
    scanf("%s", str[i]);
    if (ok) {
    } else {
      if (str[i][0] == str[i][1] && str[i][0] == 'O') {
        str[i][0] = str[i][1] = '+';
        ok = true;
      } else if (str[i][3] == str[i][4] && str[i][3] == 'O') {
        str[i][3] = str[i][4] = '+';
        ok = true;
      }
    }
  }
  puts(ok ? "YES" : "NO");
  if (!ok) {
    return;
  } else {
    for (int i = 1; i <= n; ++i) {
      puts(str[i]);
    }
  }
}
int main() {
  int n;
  scanf("%d", &n);
  solve(n);
  return 0;
}
