Bcoz the order of A,B,C can't be changed.If they had been diff.,then they would have been permuted too.So,we first replace all of them by a single thing and then,after permuting we replace first X by A,second by B and third by C.Hope u got it.
MAKING A MISTAKE IS HUMAN BUT REPEATING IT IS IDIOTIC.