Solve the inequality for q.