in your code, you can check for the collision and try to re-generate a new one. I would put a limit on how many times it will retry or have a "reserve" first digit, so that 0{then all random} and if there is a collision update the first part to 1{then all random} - lots of different ways to keep random but then also force a difference