you give stre num represent large integer integer kwe integer wonderful permutation digit num great value num there wonderful integer however care smallestvalue onesfor example num 5489355142the 1st small wonderful integer 5489355214The 2nd small wonderful integer 5489355241the 3rd small wonderful integer 5489355412the 4th small wonderful integer 5489355421return minimum number adjacent digit swap need apply num reach kth small wonderful integerthe test generate way kth small wonderful integer exist Example 1input num 5489355142 k 4Output 2explanation the 4th small wonderful number 5489355421 to number Swap index 7 index 8 5489355142 5489355412 Swap index 8 index 9 5489355412 5489355421example 2input num 11112 k 4Output 4explanation the 4th small wonderful number 21111 to number Swap index 3 index 4 11112 11121 Swap index 2 index 3 11121 11211 Swap index 1 index 2 11211 12111 Swap index 0 index 1 12111 21111example 3input num 00123 k 1output 1explanation the 1st small wonderful number 00132 to number Swap index 3 index 4 00123 00132 constraints2 numlength 10001 k 1000num consist digit