import std.stdio;

void position(int n, int row, int col, char[6][1000] rows)
{
	rows[row][col] = rows[row][col + 1] = '+';

	printf("YES\n");
	for (int i = 0; i < n; i++) {
		printf("%s\n", rows[i].ptr);
	}
}

void main()
{
	int n;
	scanf("%d", &n);

	char[6][1000] rows;
	for (int i = 0; i < n; i++) {
		scanf("%s", rows[i].ptr);
	}

	for (int i = 0; i < n; i++) {
		if (rows[i][0] == 'O' && rows[i][1] == 'O') {
			position(n, i, 0, rows);
			return;
		}
		if (rows[i][3] == 'O' && rows[i][4] == 'O') {
			position(n, i, 3, rows);
			return;
		}
	}

	printf("NO\n");
}