A non-negative integer is called a decreasing number if each digit is strictly smaller than the digit immediately to its left, from the most significant digit to the least significant digit. For example, 321 and 950 are decreasing numbers, but 322 and 958 are not.
Given N, print the N-th decreasing number when all decreasing numbers are sorted in increasing order. The number 0 is the 0-th decreasing number, and 1 is the 1st decreasing number. If the N-th decreasing number does not exist, print -1.