#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char seat[n][5];
  for (int i = 0; i < n; i++)
    for (int j = 0; j < 5; j++) cin >> seat[i][j];
  for (int i = 0; i < n; i++) {
    if (seat[i][0] == 'O' && seat[i][1] == 'O') {
      seat[i][0] = '+';
      seat[i][1] = '+';
      cout << "YES" << endl;
      for (int j = 0; j < n; j++) {
        for (int k = 0; k < 5; k++) cout << seat[j][k];
        cout << endl;
      }
      return 0;
    }
    if (seat[i][3] == 'O' && seat[i][4] == 'O') {
      seat[i][3] = '+';
      seat[i][4] = '+';
      cout << "YES" << endl;
      for (int j = 0; j < n; j++) {
        for (int k = 0; k < 5; k++) cout << seat[j][k];
        cout << endl;
      }
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
