#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char str[n][5];
  int flag = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 5; j++) {
      cin >> str[i][j];
      if (flag == 0) {
        if (j == 0 || j == 2 || j == 3) {
          continue;
        } else {
          if (str[i][j] == 'O' && str[i][j - 1] == 'O') {
            str[i][j] = '+';
            str[i][j - 1] = '+';
            flag = 1;
          }
        }
      }
    }
  }
  if (flag == 0) {
    cout << "NO";
  } else {
    cout << "YES\n";
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < 5; j++) {
        cout << str[i][j];
      }
      cout << endl;
    }
  }
}
