Finding the right sequence of drugs