Algorithm of choosing next question