#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  vector<string> v;
  string str;
  int n, f = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> str;
    v.emplace_back(str);
  }
  for (int i = 0; i < n; i++) {
    if (v[i][0] == 'O' && v[i][1] == 'O') {
      v[i][0] = v[i][1] = '+';
      f = 1;
      break;
    } else if (v[i][3] == 'O' && v[i][4] == 'O') {
      v[i][3] = v[i][4] = '+';
      f = 1;
      break;
    }
  }
  if (f) {
    cout << "YES\n";
    for (int i = 0; i < n; i++) cout << v[i] << '\n';
  } else
    cout << "NO";
  return 0;
}
