Solving the selection-recombination equation: Ancestral lines under selection and recombination