@Test
	public void resolve() {
		int[] data=new int[11];
		data[1]=1;
		for(int i=2;i<=10;i++){
			data[i]=i*data[i-1];
		}
		int count=999999;
		List<Integer> positions=new ArrayList<>();
		for(int level=10;level>1;level--){
			int pos = count/data[level-1];
			positions.add(pos);
			count=count-pos*data[level-1];
		}
		List<Integer> nums=new ArrayList<>();
		for(int i=0;i<10;i++){
			nums.add(i);
		}
		StringBuilder sb=new StringBuilder();
		for(int pos:positions){
			if(pos<=nums.size()&&pos>0){
				Integer num=nums.get(pos);
				nums.remove(num);
				sb.append(num);
			}
		}
		for(int i:nums){
			sb.append(i);
		}
		print(sb.toString());
	}