Find the order of acidic strength
(Q) is the least acidic compound because the conjugate base formed is anti aromatic and hence unstable.

(R) is more acidic than (Q) because the conjugate base is stabilized by the electron withdrawing inductive effect of two sulphur atoms.

Conjugate bases of both (P) and (S) are stable due to resonance. Among the two, conjugate base of (S) is more stable because a negative charge on Oxygen atom is more stable than a negative charge on carbon atom. Here are the resonance structures:


This is verified by @Ivan Neretin's comment on the OP.


  Let's look at some data. pKa of cyclopentadiene is about 16, while that of acetylacetone is about 9.