Reconstructing a history of recombinations from a set of sequences