#include <bits/stdc++.h>
using namespace std;
vector<string> v;
int main() {
  int n, i, f1 = 0, f2 = 0;
  string s;
  v.clear();
  s.clear();
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    cin >> s;
    v.push_back(s);
    if (s[0] == 'O' && s[1] == 'O') {
      f1 = 1;
    }
    if (s[3] == 'O' && s[4] == 'O') {
      f2 = 1;
    }
  }
  if (f1 == 1) {
    f1 = 0;
    printf("YES\n");
    for (i = 0; i < v.size(); i++) {
      s = v[i];
      if (s[0] == 'O' && s[1] == 'O' && f1 != 1) {
        s[0] = '+';
        s[1] = '+';
        f1 = 1;
      }
      cout << s << endl;
    }
  } else if (f2 == 1) {
    f2 = 0;
    printf("YES\n");
    for (i = 0; i < n; i++) {
      s = v[i];
      if (s[3] == 'O' && s[4] == 'O' && f2 != 1) {
        s[3] = '+';
        s[4] = '+';
        f2 = 1;
      }
      cout << s << endl;
    }
  } else
    printf("NO\n");
}
