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