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