Ancestral sequence reconstruction for co-evolutionary models