Phylogenetic reconstruction on ancestral sequences