#include <bits/stdc++.h>
using namespace std;
long long a, b, c, d, k, n, m, x, y, z, ans, cnt, tt;
long long mx = -1e6, lx = 1e6, lx1 = 1e6, lx2 = 1e6;
char h, h1, h2, h3;
string s, s1, s2, s3, g, g1, g2, g3;
vector<string> v, q, t;
map<long long, long long> mp;
int main() {
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> s;
    if (s[0] == s[1] and s[0] == 'O' and cnt == 0) {
      s[0] = '+';
      s[1] = '+';
      cnt++;
    } else if (s[3] == s[4] and s[3] == 'O' and cnt == 0) {
      s[3] = '+';
      s[4] = '+';
      cnt++;
    }
    v.push_back(s);
  }
  if (cnt == 1) {
    cout << "YES\n";
    for (long long i = 0; i < n; i++) {
      cout << v[i] << endl;
    }
  } else
    cout << "NO\n";
}
