?- read_term(T,[variable_names(VNs)]). B+A+Y+D+C. T = _B+_A+_E+_D+_C, VNs = ['A'=_A,'B'=_B,'C'=_C,'D'=_D,'Y'=_E] ? yes