#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 100;
int n;
string s[N];
bool f = false;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < 5; ++j) cin >> s[i][j];
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j)
      if (s[i][j] == 'O' && s[i][j + 1] == 'O' && f == false) {
        s[i][j] = s[i][j + 1] = '+';
        f = true;
        break;
      }
  if (f) {
    cout << "yes" << endl;
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < 5; ++j) {
        cout << s[i][j];
      }
      cout << endl;
    }
  } else
    cout << "NO";
  return 0;
}
