#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s[n];
  for (int i = 0; i < n; i++) cin >> s[i];
  bool ischange = false;
  for (int i = 0; i < n; i++) {
    if (ischange) break;
    for (int j = 1; j <= 5; j++) {
      if (s[i][j] == 'O' && s[i][j - 1] == 'O') {
        ischange = true;
        s[i][j] = s[i][j - 1] = '+';
        break;
      }
    }
  }
  if (!ischange) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << endl;
  for (int i = 0; i < n; i++) {
    for (int j = 1; j <= 5; j++) {
      cout << s[i][j - 1];
    }
    cout << "\n";
  }
  return 0;
}
