#include <bits/stdc++.h>
using namespace std;
int main() {
  int ans = 0, n, c = 0, s1[1000];
  cin >> n;
  string s;
  vector<string> v;
  ans = n;
  while (n--) {
    cin >> s;
    v.push_back(s);
  }
  for (auto &val : v) {
    long long pos;
    pos = val.find("OO");
    if (pos > 100000) {
      c++;
      continue;
    } else {
      replace(val.begin() + pos, val.begin() + pos + 2, 'O', '+');
      cout << "YES" << endl;
      break;
    }
  }
  if (c == ans)
    cout << "NO" << endl;
  else
    for (auto &val : v) cout << val << endl;
  return 0;
}
