Con Formating Text

hi all, to start with I'm lost....
I have 3 cells of interest in the attached example. interest 1 (colum C - an array formated cell, effectively and average of all others), interest 2 (Colum S - will contain either a blank or one of the following I,L,U or O) interest 3 (colum X)

what I am after is a formula to format cells in Colum X to give either Q,C or blank as an auto format answer.

criteria for these answers are as follows:
if both interests 1 and 2 (colum C and S) both contain O Colum X will answer Q

if only one contains a O or both contain U, colum X will answer C

if either contain I or L or blank then Colum X remains BLANK.

I understand this is no easy ask but I am utterly in the dark with this one.