Sort:  

Other way around :) q can’t be filled until all the others are full :)

Right idea though ,