OK! That code produce one random sequence of 12 different numbers.
How can you know that an output sequence is not the same as one of the previous ones?
What the OP wants is all the output sequences must be different to each other.