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