import java.lang.Math;
import java.util.*;
public class SuperRandom
{
private ArrayList<Integer> numbers;
private Random rand;
public static void main(String[] args)
{
SuperRandom sr=new SuperRandom(10);
for(int i=0;i<10;i++)
System.out.print(sr.getValue());
}
public SuperRandom(int size){
rand=new Random();
numbers=new ArrayList<>();
for(int i=0;i<size;i++)
numbers.add(i);
}
public int getValue(){
int randomIndex=rand.nextInt(numbers.size());
return numbers.remove(randomIndex);
}
public int getSize(){
return numbers.size();
}
}