You are given a number N. A number is called beautiful if for every digit x in the number there are x occurrences of it in the number
1 is beautiful because 1 has 1 occurrence
3133 is beautiful because 1 has 1 occurence and 3 has 3 occurences
224 is not beautiful
Determine the smallest beautiful number which is greater than N.
eg. N=1 ans: 22 is the smallest beautiful number greater than 1
N=250 ans: 333
Constraints: 1<N<10^12