#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, c = 0;
  cin >> n;
  string s[n];
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 4; j++)
      if (s[i][j] == 'O' && s[i][j + 1] == 'O') {
        s[i][j] = '+';
        s[i][j + 1] = '+';
        c = 1;
        break;
      }
    if (c == 1) break;
  }
  if (c == 1) {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      cout << s[i] << endl;
    }
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
