#include <bits/stdc++.h>
using namespace std;
bool possible(vector<string>& all) {
  for (int i = 0; i < all.size(); i++) {
    if (all[i][0] == all[i][1] && all[i][0] == 'O') return true;
    if (all[i][3] == all[i][4] && all[i][3] == 'O') return true;
  }
  return false;
}
vector<string> solve(vector<string>& all) {
  for (int i = 0; i < all.size(); i++) {
    if (all[i][0] == 'O' && all[i][1] == 'O') {
      all[i][0] = all[i][1] = '+';
      return all;
    }
    if (all[i][3] == 'O' && all[i][4] == 'O') {
      all[i][3] = all[i][4] = '+';
      return all;
    }
  }
}
int main() {
  int N;
  cin >> N;
  vector<string> all;
  string row = "";
  for (int i = 0; i < N; i++) {
    cin >> row;
    all.push_back(row);
  }
  if (!possible(all)) {
    cout << "NO" << endl;
    return 0;
  } else {
    cout << "YES" << endl;
    vector<string> res = solve(all);
    for (int i = 0; i < all.size(); i++) {
      cout << res[i] << endl;
    }
  }
  return 0;
}
