Give context-free grammars for the following languages: $l_1 = {a^ib^jc^kd^l\ |$ $i=j$ or $k=l$ but not both, $i,j,k,l \geq 0}$
a) $S \rightarrow AB \ | \ CD$
b) $S \rightarrow ABD \ | \ C$
c) $S \rightarrow AB \ | \ CD \ | \ AC \ | \ BD$
d) $S \rightarrow ACD \ | \ B$