Problem:


Score : 400 points

Problem Statement

A positive integer X is said to be a lunlun number if and only if the following condition is satisfied:

In the base ten representation of X (without leading zeros), for every pair of two adjacent digits, the absolute difference of those digits is at most 1.

For example, 1234, 1, and 334 are lunlun numbers, while none of 31415, 119, or 13579 is.

You are given a positive integer K. Find the K-th smallest lunlun number.

Constraints

1 \leq K \leq 10^5

All values in input are integers.

Input

Input is given from Standard Input in the following format:

K

Output

Print the answer.

Sample Input 1

15

Sample Output 1

23

We will list the 15 smallest lunlun numbers in ascending order:

1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
21,
22,
23.

Thus, the answer is 23.

Sample Input 2

1

Sample Output 2

1

Sample Input 3

13

Sample Output 3

21

Sample Input 4

100000

Sample Output 4

3234566667

Note that the answer may not fit into the 32-bit signed integer type.



Sample input:
15


Sample output:
23

Submission status: Runtime Error

Solution code:
K = int(input())
a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 21, 22, 23, 32, 33, 34, 43, 44, 45, 54, 55, 56, 65, 66, 67, 76, 77, 78, 87, 88, 89, 98, 99, 100, 101, 110, 111, 112, 121, 122, 123, 210, 211, 212, 221, 222, 223, 232, 233, 234, 321, 322, 323, 332, 333, 334, 343, 344, 345, 432, 433, 434, 443, 444, 445, 454, 455, 456, 543, 544, 545, 554, 555, 556, 565, 566, 567, 654, 655, 656, 665, 666, 667, 676, 677, 678, 765, 766, 767, 776, 777, 778, 787, 788, 789, 876, 877, 878, 887, 888, 889, 898, 899, 987, 988, 989, 998, 999, 1000, 1001, 1010, 1011, 1012, 1100, 1101, 1110, 1111, 1112, 1121, 1122, 1123, 1210, 1211, 1212, 1221, 1222, 1223, 1232, 1233, 1234, 2100, 2101, 2110, 2111, 2112, 2121, 2122, 2123, 2210, 2211, 2212, 2221, 2222, 2223, 2232, 2233, 2234, 2321, 2322, 2323, 2332, 2333, 2334, 2343, 2344, 2345, 3210, 3211, 3212, 3221, 3222, 3223, 3232, 3233, 3234, 3321, 3322, 3323, 3332, 3333, 3334, 3343, 3344, 3345, 3432, 3433, 3434, 3443, 3444, 3445, 3454, 3455, 3456, 4321, 4322, 4323, 4332, 4333, 4334, 4343, 4344, 4345, 4432, 4433, 4434, 4443, 4444, 4445, 4454, 4455, 4456, 4543, 4544, 4545, 4554, 4555, 4556, 4565, 4566, 4567, 5432, 5433, 5434, 5443, 5444, 5445, 5454, 5455, 5456, 5543, 5544, 5545, 5554, 5555, 5556, 5565, 5566, 5567, 5654, 5655, 5656, 5665, 5666, 5667, 5676, 5677, 5678, 6543, 6544, 6545, 6554, 6555, 6556, 6565, 6566, 6567, 6654, 6655, 6656, 6665, 6666, 6667, 6676, 6677, 6678, 6765, 6766, 6767, 6776, 6777, 6778, 6787, 6788, 6789, 7654, 7655, 7656, 7665, 7666, 7667, 7676, 7677, 7678, 7765, 7766, 7767, 7776, 7777, 7778, 7787, 7788, 7789, 7876, 7877, 7878, 7887, 7888, 7889, 7898, 7899, 8765, 8766, 8767, 8776, 8777, 8778, 8787, 8788, 8789, 8876, 8877, 8878, 8887, 8888, 8889, 8898, 8899, 8987, 8988, 8989, 8998, 8999, 9876, 9877, 9878, 9887, 9888, 9889, 9898, 9899, 9987, 9988, 9989, 9998, 9999, 10000, 10001, 10010, 10011, 10012, 10100, 10101, 10110, 10111, 10112, 10121, 10122, 10123, 11000, 11001, 11010, 11011, 11012, 11100, 11101, 11110, 11111, 11112, 11121, 11122, 11123, 11210, 11211, 11212, 11221, 11222, 11223, 11232, 11233, 11234, 12100, 12101, 12110, 12111, 12112, 12121, 12122, 12123, 12210, 12211, 12212, 12221, 12222, 12223, 12232, 12233, 12234, 12321, 12322, 12323, 12332, 12333, 12334, 12343, 12344, 12345, 21000, 21001, 21010, 21011, 21012, 21100, 21101, 21110, 21111, 21112, 21121, 21122, 21123, 21210, 21211, 21212, 21221, 21222, 21223, 21232, 21233, 21234, 22100, 22101, 22110, 22111, 22112, 22121, 22122, 22123, 22210, 22211, 22212, 22221, 22222, 22223, 22232, 22233, 22234, 22321, 22322, 22323, 22332, 22333, 22334, 22343, 22344, 22345, 23210, 23211, 23212, 23221, 23222, 23223, 23232, 23233, 23234, 23321, 23322, 23323, 23332, 23333, 23334, 23343, 23344, 23345, 23432, 23433, 23434, 23443, 23444, 23445, 23454, 23455, 23456, 32100, 32101, 32110, 32111, 32112, 32121, 32122, 32123, 32210, 32211, 32212, 32221, 32222, 32223, 32232, 32233, 32234, 32321, 32322, 32323, 32332, 32333, 32334, 32343, 32344, 32345, 33210, 33211, 33212, 33221, 33222, 33223, 33232, 33233, 33234, 33321, 33322, 33323, 33332, 33333, 33334, 33343, 33344, 33345, 33432, 33433, 33434, 33443, 33444, 33445, 33454, 33455, 33456, 34321, 34322, 34323, 34332, 34333, 34334, 34343, 34344, 34345, 34432, 34433, 34434, 34443, 34444, 34445, 34454, 34455, 34456, 34543, 34544, 34545, 34554, 34555, 34556, 34565, 34566, 34567, 43210, 43211, 43212, 43221, 43222, 43223, 43232, 43233, 43234, 43321, 43322, 43323, 43332, 43333, 43334, 43343, 43344, 43345, 43432, 43433, 43434, 43443, 43444, 43445, 43454, 43455, 43456, 44321, 44322, 44323, 44332, 44333, 44334, 44343, 44344, 44345, 44432, 44433, 44434, 44443, 44444, 44445, 44454, 44455, 44456, 44543, 44544, 44545, 44554, 44555, 44556, 44565, 44566, 44567, 45432, 45433, 45434, 45443, 45444, 45445, 45454, 45455, 45456, 45543, 45544, 45545, 45554, 45555, 45556, 45565, 45566, 45567, 45654, 45655, 45656, 45665, 45666, 45667, 45676, 45677, 45678, 54321, 54322, 54323, 54332, 54333, 54334, 54343, 54344, 54345, 54432, 54433, 54434, 54443, 54444, 54445, 54454, 54455, 54456, 54543, 54544, 54545, 54554, 54555, 54556, 54565, 54566, 54567, 55432, 55433, 55434, 55443, 55444, 55445, 55454, 55455, 55456, 55543, 55544, 55545, 55554, 55555, 55556, 55565, 55566, 55567, 55654, 55655, 55656, 55665, 55666, 55667, 55676, 55677, 55678, 56543, 56544, 56545, 56554, 56555, 56556, 56565, 56566, 56567, 56654, 56655, 56656, 56665, 56666, 56667, 56676, 56677, 56678, 56765, 56766, 56767, 56776, 56777, 56778, 56787, 56788, 56789, 65432, 65433, 65434, 65443, 65444, 65445, 65454, 65455, 65456, 65543, 65544, 65545, 65554, 65555, 65556, 65565, 65566, 65567, 65654, 65655, 65656, 65665, 65666, 65667, 65676, 65677, 65678, 66543, 66544, 66545, 66554, 66555, 66556, 66565, 66566, 66567, 66654, 66655, 66656, 66665, 66666, 66667, 66676, 66677, 66678, 66765, 66766, 66767, 66776, 66777, 66778, 66787, 66788, 66789, 67654, 67655, 67656, 67665, 67666, 67667, 67676, 67677, 67678, 67765, 67766, 67767, 67776, 67777, 67778, 67787, 67788, 67789, 67876, 67877, 67878, 67887, 67888, 67889, 67898, 67899, 76543, 76544, 76545, 76554, 76555, 76556, 76565, 76566, 76567, 76654, 76655, 76656, 76665, 76666, 76667, 76676, 76677, 76678, 76765, 76766, 76767, 76776, 76777, 76778, 76787, 76788, 76789, 77654, 77655, 77656, 77665, 77666, 77667, 77676, 77677, 77678, 77765, 77766, 77767, 77776, 77777, 77778, 77787, 77788, 77789, 77876, 77877, 77878, 77887, 77888, 77889, 77898, 77899, 78765, 78766, 78767, 78776, 78777, 78778, 78787, 78788, 78789, 78876, 78877, 78878, 78887, 78888, 78889, 78898, 78899, 78987, 78988, 78989, 78998, 78999, 87654, 87655, 87656, 87665, 87666, 87667, 87676, 87677, 87678, 87765, 87766, 87767, 87776, 87777, 87778, 87787, 87788, 87789, 87876, 87877, 87878, 87887, 87888, 87889, 87898, 87899, 88765, 88766, 88767, 88776, 88777, 88778, 88787, 88788, 88789, 88876, 88877, 88878, 88887, 88888, 88889, 88898, 88899, 88987, 88988, 88989, 88998, 88999, 89876, 89877, 89878, 89887, 89888, 89889, 89898, 89899, 89987, 89988, 89989, 89998, 89999, 98765, 98766, 98767, 98776, 98777, 98778, 98787, 98788, 98789, 98876, 98877, 98878, 98887, 98888, 98889, 98898, 98899, 98987, 98988, 98989, 98998, 98999, 99876, 99877, 99878, 99887, 99888, 99889, 99898, 99899, 99987, 99988, 99989, 99998, 99999, 100000, 100001, 100010, 100011, 100012, 100100, 100101, 100110, 100111, 100112, 100121, 100122, 100123, 101000, 101001, 101010, 101011, 101012, 101100, 101101, 101110, 101111, 101112, 101121, 101122, 101123, 101210, 101211, 101212, 101221, 101222, 101223, 101232, 101233, 101234, 110000, 110001, 110010, 110011, 110012, 110100, 110101, 110110, 110111, 110112, 110121, 110122, 110123, 111000, 111001, 111010, 111011, 111012, 111100, 111101, 111110, 111111, 111112, 111121, 111122, 111123, 111210, 111211, 111212, 111221, 111222, 111223, 111232, 111233, 111234, 112100, 112101, 112110, 112111, 112112, 112121, 112122, 112123, 112210, 112211, 112212, 112221, 112222, 112223, 112232, 112233, 112234, 112321, 112322, 112323, 112332, 112333, 112334, 112343, 112344, 112345, 121000, 121001, 121010, 121011, 121012, 121100, 121101, 121110, 121111, 121112, 121121, 121122, 121123, 121210, 121211, 121212, 121221, 121222, 121223, 121232, 121233, 121234, 122100, 122101, 122110, 122111, 122112, 122121, 122122, 122123, 122210, 122211, 122212, 122221, 122222, 122223, 122232, 122233, 122234, 122321, 122322, 122323, 122332, 122333, 122334, 122343, 122344, 122345, 123210, 123211, 123212, 123221, 123222, 123223, 123232, 123233, 123234, 123321, 123322, 123323, 123332, 123333, 123334, 123343, 123344, 123345, 123432, 123433, 123434, 123443, 123444, 123445, 123454, 123455, 123456, 210000, 210001, 210010, 210011, 210012, 210100, 210101, 210110, 210111, 210112, 210121, 210122, 210123, 211000, 211001, 211010, 211011, 211012, 211100, 211101, 211110, 211111, 211112, 211121, 211122, 211123, 211210, 211211, 211212, 211221, 211222, 211223, 211232, 211233, 211234, 212100, 212101, 212110, 212111, 212112, 212121, 212122, 212123, 212210, 212211, 212212, 212221, 212222, 212223, 212232, 212233, 212234, 212321, 212322, 212323, 212332, 212333, 212334, 212343, 212344, 212345, 221000, 221001, 221010, 221011, 221012, 221100, 221101, 221110, 221111, 221112, 221121, 221122, 221123, 221210, 221211, 221212, 221221, 221222, 221223, 221232, 221233, 221234, 222100, 222101, 222110, 222111, 222112, 222121, 222122, 222123, 222210, 222211, 222212, 222221, 222222, 222223, 222232, 222233, 222234, 222321, 222322, 222323, 222332, 222333, 222334, 222343, 222344, 222345, 223210, 223211, 223212, 223221, 223222, 223223, 223232, 223233, 223234, 223321, 223322, 223323, 223332, 223333, 223334, 223343, 223344, 223345, 223432, 223433, 223434, 223443, 223444, 223445, 223454, 223455, 223456, 232100, 232101, 232110, 232111, 232112, 232121, 232122, 232123, 232210, 232211, 232212, 232221, 232222, 232223, 232232, 232233, 232234, 232321, 232322, 232323, 232332, 232333, 232334, 232343, 232344, 232345, 233210, 233211, 233212, 233221, 233222, 233223, 233232, 233233, 233234, 233321, 233322, 233323, 233332, 233333, 233334, 233343, 233344, 233345, 233432, 233433, 233434, 233443, 233444, 233445, 233454, 233455, 233456, 234321, 234322, 234323, 234332, 234333, 234334, 234343, 234344, 234345, 234432, 234433, 234434, 234443, 234444, 234445, 234454, 234455, 234456, 234543, 234544, 234545, 234554, 234555, 234556, 234565, 234566, 234567, 321000, 321001, 321010, 321011, 321012, 321100, 321101, 321110, 321111, 321112, 321121, 321122, 321123, 321210, 321211, 321212, 321221, 321222, 321223, 321232, 321233, 321234, 322100, 322101, 322110, 322111, 322112, 322121, 322122, 322123, 322210, 322211, 322212, 322221, 322222, 322223, 322232, 322233, 322234, 322321, 322322, 322323, 322332, 322333, 322334, 322343, 322344, 322345, 323210, 323211, 323212, 323221, 323222, 323223, 323232, 323233, 323234, 323321, 323322, 323323, 323332, 323333, 323334, 323343, 323344, 323345, 323432, 323433, 323434, 323443, 323444, 323445, 323454, 323455, 323456, 332100, 332101, 332110, 332111, 332112, 332121, 332122, 332123, 332210, 332211, 332212, 332221, 332222, 332223, 332232, 332233, 332234, 332321, 332322, 332323, 332332, 332333, 332334, 332343, 332344, 332345, 333210, 333211, 333212, 333221, 333222, 333223, 333232, 333233, 333234, 333321, 333322, 333323, 333332, 333333, 333334, 333343, 333344, 333345, 333432, 333433, 333434, 333443, 333444, 333445, 333454, 333455, 333456, 334321, 334322, 334323, 334332, 334333, 334334, 334343, 334344, 334345, 334432, 334433, 334434, 334443, 334444, 334445, 334454, 334455, 334456, 334543, 334544, 334545, 334554, 334555, 334556, 334565, 334566, 334567, 343210, 343211, 343212, 343221, 343222, 343223, 343232, 343233, 343234, 343321, 343322, 343323, 343332, 343333, 343334, 343343, 343344, 343345, 343432, 343433, 343434, 343443, 343444, 343445, 343454, 343455, 343456, 344321, 344322, 344323, 344332, 344333, 344334, 344343, 344344, 344345, 344432, 344433, 344434, 344443, 344444, 344445, 344454, 344455, 344456, 344543, 344544, 344545, 344554, 344555, 344556, 344565, 344566, 344567, 345432, 345433, 345434, 345443, 345444, 345445, 345454, 345455, 345456, 345543, 345544, 345545, 345554, 345555, 345556, 345565, 345566, 345567, 345654, 345655, 345656, 345665, 345666, 345667, 345676, 345677, 345678, 432100, 432101, 432110, 432111, 432112, 432121, 432122, 432123, 432210, 432211, 432212, 432221, 432222, 432223, 432232, 432233, 432234, 432321, 432322, 432323, 432332, 432333, 432334, 432343, 432344, 432345, 433210, 433211, 433212, 433221, 433222, 433223, 433232, 433233, 433234, 433321, 433322, 433323, 433332, 433333, 433334, 433343, 433344, 433345, 433432, 433433, 433434, 433443, 433444, 433445, 433454, 433455, 433456, 434321, 434322, 434323, 434332, 434333, 434334, 434343, 434344, 434345, 434432, 434433, 434434, 434443, 434444, 434445, 434454, 434455, 434456, 434543, 434544, 434545, 434554, 434555, 434556, 434565, 434566, 434567, 443210, 443211, 443212, 443221, 443222, 443223, 443232, 443233, 443234, 443321, 443322, 443323, 443332, 443333, 443334, 443343, 443344, 443345, 443432, 443433, 443434, 443443, 443444, 443445, 443454, 443455, 443456, 444321, 444322, 444323, 444332, 444333, 444334, 444343, 444344, 444345, 444432, 444433, 444434, 444443, 444444, 444445, 444454, 444455, 444456, 444543, 444544, 444545, 444554, 444555, 444556, 444565, 444566, 444567, 445432, 445433, 445434, 445443, 445444, 445445, 445454, 445455, 445456, 445543, 445544, 445545, 445554, 445555, 445556, 445565, 445566, 445567, 445654, 445655, 445656, 445665, 445666, 445667, 445676, 445677, 445678, 454321, 454322, 454323, 454332, 454333, 454334, 454343, 454344, 454345, 454432, 454433, 454434, 454443, 454444, 454445, 454454, 454455, 454456, 454543, 454544, 454545, 454554, 454555, 454556, 454565, 454566, 454567, 455432, 455433, 455434, 455443, 455444, 455445, 455454, 455455, 455456, 455543, 455544, 455545, 455554, 455555, 455556, 455565, 455566, 455567, 455654, 455655, 455656, 455665, 455666, 455667, 455676, 455677, 455678, 456543, 456544, 456545, 456554, 456555, 456556, 456565, 456566, 456567, 456654, 456655, 456656, 456665, 456666, 456667, 456676, 456677, 456678, 456765, 456766, 456767, 456776, 456777, 456778, 456787, 456788, 456789, 543210, 543211, 543212, 543221, 543222, 543223, 543232, 543233, 543234, 543321, 543322, 543323, 543332, 543333, 543334, 543343, 543344, 543345, 543432, 543433, 543434, 543443, 543444, 543445, 543454, 543455, 543456, 544321, 544322, 544323, 544332, 544333, 544334, 544343, 544344, 544345, 544432, 544433, 544434, 544443, 544444, 544445, 544454, 544455, 544456, 544543, 544544, 544545, 544554, 544555, 544556, 544565, 544566, 544567, 545432, 545433, 545434, 545443, 545444, 545445, 545454, 545455, 545456, 545543, 545544, 545545, 545554, 545555, 545556, 545565, 545566, 545567, 545654, 545655, 545656, 545665, 545666, 545667, 545676, 545677, 545678, 554321, 554322, 554323, 554332, 554333, 554334, 554343, 554344, 554345, 554432, 554433, 554434, 554443, 554444, 554445, 554454, 554455, 554456, 554543, 554544, 554545, 554554, 554555, 554556, 554565, 554566, 554567, 555432, 555433, 555434, 555443, 555444, 555445, 555454, 555455, 555456, 555543, 555544, 555545, 555554, 555555, 555556, 555565, 555566, 555567, 555654, 555655, 555656, 555665, 555666, 555667, 555676, 555677, 555678, 556543, 556544, 556545, 556554, 556555, 556556, 556565, 556566, 556567, 556654, 556655, 556656, 556665, 556666, 556667, 556676, 556677, 556678, 556765, 556766, 556767, 556776, 556777, 556778, 556787, 556788, 556789, 565432, 565433, 565434, 565443, 565444, 565445, 565454, 565455, 565456, 565543, 565544, 565545, 565554, 565555, 565556, 565565, 565566, 565567, 565654, 565655, 565656, 565665, 565666, 565667, 565676, 565677, 565678, 566543, 566544, 566545, 566554, 566555, 566556, 566565, 566566, 566567, 566654, 566655, 566656, 566665, 566666, 566667, 566676, 566677, 566678, 566765, 566766, 566767, 566776, 566777, 566778, 566787, 566788, 566789, 567654, 567655, 567656, 567665, 567666, 567667, 567676, 567677, 567678, 567765, 567766, 567767, 567776, 567777, 567778, 567787, 567788, 567789, 567876, 567877, 567878, 567887, 567888, 567889, 567898, 567899, 654321, 654322, 654323, 654332, 654333, 654334, 654343, 654344, 654345, 654432, 654433, 654434, 654443, 654444, 654445, 654454, 654455, 654456, 654543, 654544, 654545, 654554, 654555, 654556, 654565, 654566, 654567, 655432, 655433, 655434, 655443, 655444, 655445, 655454, 655455, 655456, 655543, 655544, 655545, 655554, 655555, 655556, 655565, 655566, 655567, 655654, 655655, 655656, 655665, 655666, 655667, 655676, 655677, 655678, 656543, 656544, 656545, 656554, 656555, 656556, 656565, 656566, 656567, 656654, 656655, 656656, 656665, 656666, 656667, 656676, 656677, 656678, 656765, 656766, 656767, 656776, 656777, 656778, 656787, 656788, 656789, 665432, 665433, 665434, 665443, 665444, 665445, 665454, 665455, 665456, 665543, 665544, 665545, 665554, 665555, 665556, 665565, 665566, 665567, 665654, 665655, 665656, 665665, 665666, 665667, 665676, 665677, 665678, 666543, 666544, 666545, 666554, 666555, 666556, 666565, 666566, 666567, 666654, 666655, 666656, 666665, 666666, 666667, 666676, 666677, 666678, 666765, 666766, 666767, 666776, 666777, 666778, 666787, 666788, 666789, 667654, 667655, 667656, 667665, 667666, 667667, 667676, 667677, 667678, 667765, 667766, 667767, 667776, 667777, 667778, 667787, 667788, 667789, 667876, 667877, 667878, 667887, 667888, 667889, 667898, 667899, 676543, 676544, 676545, 676554, 676555, 676556, 676565, 676566, 676567, 676654, 676655, 676656, 676665, 676666, 676667, 676676, 676677, 676678, 676765, 676766, 676767, 676776, 676777, 676778, 676787, 676788, 676789, 677654, 677655, 677656, 677665, 677666, 677667, 677676, 677677, 677678, 677765, 677766, 677767, 677776, 677777, 677778, 677787, 677788, 677789, 677876, 677877, 677878, 677887, 677888, 677889, 677898, 677899, 678765, 678766, 678767, 678776, 678777, 678778, 678787, 678788, 678789, 678876, 678877, 678878, 678887, 678888, 678889, 678898, 678899, 678987, 678988, 678989, 678998, 678999, 765432, 765433, 765434, 765443, 765444, 765445, 765454, 765455, 765456, 765543, 765544, 765545, 765554, 765555, 765556, 765565, 765566, 765567, 765654, 765655, 765656, 765665, 765666, 765667, 765676, 765677, 765678, 766543, 766544, 766545, 766554, 766555, 766556, 766565, 766566, 766567, 766654, 766655, 766656, 766665, 766666, 766667, 766676, 766677, 766678, 766765, 766766, 766767, 766776, 766777, 766778, 766787, 766788, 766789, 767654, 767655, 767656, 767665, 767666, 767667, 767676, 767677, 767678, 767765, 767766, 767767, 767776, 767777, 767778, 767787, 767788, 767789, 767876, 767877, 767878, 767887, 767888, 767889, 767898, 767899, 776543, 776544, 776545, 776554, 776555, 776556, 776565, 776566, 776567, 776654, 776655, 776656, 776665, 776666, 776667, 776676, 776677, 776678, 776765, 776766, 776767, 776776, 776777, 776778, 776787, 776788, 776789, 777654, 777655, 777656, 777665, 777666, 777667, 777676, 777677, 777678, 777765, 777766, 777767, 777776, 777777, 777778, 777787, 777788, 777789, 777876, 777877, 777878, 777887, 777888, 777889, 777898, 777899, 778765, 778766, 778767, 778776, 778777, 778778, 778787, 778788, 778789, 778876, 778877, 778878, 778887, 778888, 778889, 778898, 778899, 778987, 778988, 778989, 778998, 778999, 787654, 787655, 787656, 787665, 787666, 787667, 787676, 787677, 787678, 787765, 787766, 787767, 787776, 787777, 787778, 787787, 787788, 787789, 787876, 787877, 787878, 787887, 787888, 787889, 787898, 787899, 788765, 788766, 788767, 788776, 788777, 788778, 788787, 788788, 788789, 788876, 788877, 788878, 788887, 788888, 788889, 788898, 788899, 788987, 788988, 788989, 788998, 788999, 789876, 789877, 789878, 789887, 789888, 789889, 789898, 789899, 789987, 789988, 789989, 789998, 789999, 876543, 876544, 876545, 876554, 876555, 876556, 876565, 876566, 876567, 876654, 876655, 876656, 876665, 876666, 876667, 876676, 876677, 876678, 876765, 876766, 876767, 876776, 876777, 876778, 876787, 876788, 876789, 877654, 877655, 877656, 877665, 877666, 877667, 877676, 877677, 877678, 877765, 877766, 877767, 877776, 877777, 877778, 877787, 877788, 877789, 877876, 877877, 877878, 877887, 877888, 877889, 877898, 877899, 878765, 878766, 878767, 878776, 878777, 878778, 878787, 878788, 878789, 878876, 878877, 878878, 878887, 878888, 878889, 878898, 878899, 878987, 878988, 878989, 878998, 878999, 887654, 887655, 887656, 887665, 887666, 887667, 887676, 887677, 887678, 887765, 887766, 887767, 887776, 887777, 887778, 887787, 887788, 887789, 887876, 887877, 887878, 887887, 887888, 887889, 887898, 887899, 888765, 888766, 888767, 888776, 888777, 888778, 888787, 888788, 888789, 888876, 888877, 888878, 888887, 888888, 888889, 888898, 888899, 888987, 888988, 888989, 888998, 888999, 889876, 889877, 889878, 889887, 889888, 889889, 889898, 889899, 889987, 889988, 889989, 889998, 889999, 898765, 898766, 898767, 898776, 898777, 898778, 898787, 898788, 898789, 898876, 898877, 898878, 898887, 898888, 898889, 898898, 898899, 898987, 898988, 898989, 898998, 898999, 899876, 899877, 899878, 899887, 899888, 899889, 899898, 899899, 899987, 899988, 899989, 899998, 899999, 987654, 987655, 987656, 987665, 987666, 987667, 987676, 987677, 987678, 987765, 987766, 987767, 987776, 987777, 987778, 987787, 987788, 987789, 987876, 987877, 987878, 987887, 987888, 987889, 987898, 987899, 988765, 988766, 988767, 988776, 988777, 988778, 988787, 988788, 988789, 988876, 988877, 988878, 988887, 988888, 988889, 988898, 988899, 988987, 988988, 988989, 988998, 988999, 989876, 989877, 989878, 989887, 989888, 989889, 989898, 989899, 989987, 989988, 989989, 989998, 989999, 998765, 998766, 998767, 998776, 998777, 998778, 998787, 998788, 998789, 998876, 998877, 998878, 998887, 998888, 998889, 998898, 998899, 998987, 998988, 998989, 998998, 998999, 999876, 999877, 999878, 999887, 999888, 999889, 999898, 999899, 999987, 999988, 999989, 999998, 999999, 1000000, 1000001, 1000010, 1000011, 1000012, 1000100, 1000101, 1000110, 1000111, 1000112, 1000121, 1000122, 1000123, 1001000, 1001001, 1001010, 1001011, 1001012, 1001100, 1001101, 1001110, 1001111, 1001112, 1001121, 1001122, 1001123, 1001210, 1001211, 1001212, 1001221, 1001222, 1001223, 1001232, 1001233, 1001234, 1010000, 1010001, 1010010, 1010011, 1010012, 1010100, 1010101, 1010110, 1010111, 1010112, 1010121, 1010122, 1010123, 1011000, 1011001, 1011010, 1011011, 1011012, 1011100, 1011101, 1011110, 1011111, 1011112, 1011121, 1011122, 1011123, 1011210, 1011211, 1011212, 1011221, 1011222, 1011223, 1011232, 1011233, 1011234, 1012100, 1012101, 1012110, 1012111, 1012112, 1012121, 1012122, 1012123, 1012210, 1012211, 1012212, 1012221, 1012222, 1012223, 1012232, 1012233, 1012234, 1012321, 1012322, 1012323, 1012332, 1012333, 1012334, 1012343, 1012344, 1012345, 1100000, 1100001, 1100010, 1100011, 1100012, 1100100, 1100101, 1100110, 1100111, 1100112, 1100121, 1100122, 1100123, 1101000, 1101001, 1101010, 1101011, 1101012, 1101100, 1101101, 1101110, 1101111, 1101112, 1101121, 1101122, 1101123, 1101210, 1101211, 1101212, 1101221, 1101222, 1101223, 1101232, 1101233, 1101234, 1110000, 1110001, 1110010, 1110011, 1110012, 1110100, 1110101, 1110110, 1110111, 1110112, 1110121, 1110122, 1110123, 1111000, 1111001, 1111010, 1111011, 1111012, 1111100, 1111101, 1111110, 1111111, 1111112, 1111121, 1111122, 1111123, 1111210, 1111211, 1111212, 1111221, 1111222, 1111223, 1111232, 1111233, 1111234, 1112100, 1112101, 1112110, 1112111, 1112112, 1112121, 1112122, 1112123, 1112210, 1112211, 1112212, 1112221, 1112222, 1112223, 1112232, 1112233, 1112234, 1112321, 1112322, 1112323, 1112332, 1112333, 1112334, 1112343, 1112344, 1112345, 1121000, 1121001, 1121010, 1121011, 1121012, 1121100, 1121101, 1121110, 1121111, 1121112, 1121121, 1121122, 1121123, 1121210, 1121211, 1121212, 1121221, 1121222, 1121223, 1121232, 1121233, 1121234, 1122100, 1122101, 1122110, 1122111, 1122112, 1122121, 1122122, 1122123, 1122210, 1122211, 1122212, 1122221, 1122222, 1122223, 1122232, 1122233, 1122234, 1122321, 1122322, 1122323, 1122332, 1122333, 1122334, 1122343, 1122344, 1122345, 1123210, 1123211, 1123212, 1123221, 1123222, 1123223, 1123232, 1123233, 1123234, 1123321, 1123322, 1123323, 1123332, 1123333, 1123334, 1123343, 1123344, 1123345, 1123432, 1123433, 1123434, 1123443, 1123444, 1123445, 1123454, 1123455, 1123456, 1210000, 1210001, 1210010, 1210011, 1210012, 1210100, 1210101, 1210110, 1210111, 1210112, 1210121, 1210122, 1210123, 1211000, 1211001, 1211010, 1211011, 1211012, 1211100, 1211101, 1211110, 1211111, 1211112, 1211121, 1211122, 1211123, 1211210, 1211211, 1211212, 1211221, 1211222, 1211223, 1211232, 1211233, 1211234, 1212100, 1212101, 1212110, 1212111, 1212112, 1212121, 1212122, 1212123, 1212210, 1212211, 1212212, 1212221, 1212222, 1212223, 1212232, 1212233, 1212234, 1212321, 1212322, 1212323, 1212332, 1212333, 1212334, 1212343, 1212344, 1212345, 1221000, 1221001, 1221010, 1221011, 1221012, 1221100, 1221101, 1221110, 1221111, 1221112, 1221121, 1221122, 1221123, 1221210, 1221211, 1221212, 1221221, 1221222, 1221223, 1221232, 1221233, 1221234, 1222100, 1222101, 1222110, 1222111, 1222112, 1222121, 1222122, 1222123, 1222210, 1222211, 1222212, 1222221, 1222222, 1222223, 1222232, 1222233, 1222234, 1222321, 1222322, 1222323, 1222332, 1222333, 1222334, 1222343, 1222344, 1222345, 1223210, 1223211, 1223212, 1223221, 1223222, 1223223, 1223232, 1223233, 1223234, 1223321, 1223322, 1223323, 1223332, 1223333, 1223334, 1223343, 1223344, 1223345, 1223432, 1223433, 1223434, 1223443, 1223444, 1223445, 1223454, 1223455, 1223456, 1232100, 1232101, 1232110, 1232111, 1232112, 1232121, 1232122, 1232123, 1232210, 1232211, 1232212, 1232221, 1232222, 1232223, 1232232, 1232233, 1232234, 1232321, 1232322, 1232323, 1232332, 1232333, 1232334, 1232343, 1232344, 1232345, 1233210, 1233211, 1233212, 1233221, 1233222, 1233223, 1233232, 1233233, 1233234, 1233321, 1233322, 1233323, 1233332, 1233333, 1233334, 1233343, 1233344, 1233345, 1233432, 1233433, 1233434, 1233443, 1233444, 1233445, 1233454, 1233455, 1233456, 1234321, 1234322, 1234323, 1234332, 1234333, 1234334, 1234343, 1234344, 1234345, 1234432, 1234433, 1234434, 1234443, 1234444, 1234445, 1234454, 1234455, 1234456, 1234543, 1234544, 1234545, 1234554, 1234555, 1234556, 1234565, 1234566, 1234567, 2100000, 2100001, 2100010, 2100011, 2100012, 2100100, 2100101, 2100110, 2100111, 2100112, 2100121, 2100122, 2100123, 2101000, 2101001, 2101010, 2101011, 2101012, 2101100, 2101101, 2101110, 2101111, 2101112, 2101121, 2101122, 2101123, 2101210, 2101211, 2101212, 2101221, 2101222, 2101223, 2101232, 2101233, 2101234, 2110000, 2110001, 2110010, 2110011, 2110012, 2110100, 2110101, 2110110, 2110111, 2110112, 2110121, 2110122, 2110123, 2111000, 2111001, 2111010, 2111011, 2111012, 2111100, 2111101, 2111110, 2111111, 2111112, 2111121, 2111122, 2111123, 2111210, 2111211, 2111212, 2111221, 2111222, 2111223, 2111232, 2111233, 2111234, 2112100, 2112101, 2112110, 2112111, 2112112, 2112121, 2112122, 2112123, 2112210, 2112211, 2112212, 2112221, 2112222, 2112223, 2112232, 2112233, 2112234, 2112321, 2112322, 2112323, 2112332, 2112333, 2112334, 2112343, 2112344, 2112345, 2121000, 2121001, 2121010, 2121011, 2121012, 2121100, 2121101, 2121110, 2121111, 2121112, 2121121, 2121122, 2121123, 2121210, 2121211, 2121212, 2121221, 2121222, 2121223, 2121232, 2121233, 2121234, 2122100, 2122101, 2122110, 2122111, 2122112, 2122121, 2122122, 2122123, 2122210, 2122211, 2122212, 2122221, 2122222, 2122223, 2122232, 2122233, 2122234, 2122321, 2122322, 2122323, 2122332, 2122333, 2122334, 2122343, 2122344, 2122345, 2123210, 2123211, 2123212, 2123221, 2123222, 2123223, 2123232, 2123233, 2123234, 2123321, 2123322, 2123323, 2123332, 2123333, 2123334, 2123343, 2123344, 2123345, 2123432, 2123433, 2123434, 2123443, 2123444, 2123445, 2123454, 2123455, 2123456, 2210000, 2210001, 2210010, 2210011, 2210012, 2210100, 2210101, 2210110, 2210111, 2210112, 2210121, 2210122, 2210123, 2211000, 2211001, 2211010, 2211011, 2211012, 2211100, 2211101, 2211110, 2211111, 2211112, 2211121, 2211122, 2211123, 2211210, 2211211, 2211212, 2211221, 2211222, 2211223, 2211232, 2211233, 2211234, 2212100, 2212101, 2212110, 2212111, 2212112, 2212121, 2212122, 2212123, 2212210, 2212211, 2212212, 2212221, 2212222, 2212223, 2212232, 2212233, 2212234, 2212321, 2212322, 2212323, 2212332, 2212333, 2212334, 2212343, 2212344, 2212345, 2221000, 2221001, 2221010, 2221011, 2221012, 2221100, 2221101, 2221110, 2221111, 2221112, 2221121, 2221122, 2221123, 2221210, 2221211, 2221212, 2221221, 2221222, 2221223, 2221232, 2221233, 2221234, 2222100, 2222101, 2222110, 2222111, 2222112, 2222121, 2222122, 2222123, 2222210, 2222211, 2222212, 2222221, 2222222, 2222223, 2222232, 2222233, 2222234, 2222321, 2222322, 2222323, 2222332, 2222333, 2222334, 2222343, 2222344, 2222345, 2223210, 2223211, 2223212, 2223221, 2223222, 2223223, 2223232, 2223233, 2223234, 2223321, 2223322, 2223323, 2223332, 2223333, 2223334, 2223343, 2223344, 2223345, 2223432, 2223433, 2223434, 2223443, 2223444, 2223445, 2223454, 2223455, 2223456, 2232100, 2232101, 2232110, 2232111, 2232112, 2232121, 2232122, 2232123, 2232210, 2232211, 2232212, 2232221, 2232222, 2232223, 2232232, 2232233, 2232234, 2232321, 2232322, 2232323, 2232332, 2232333, 2232334, 2232343, 2232344, 2232345, 2233210, 2233211, 2233212, 2233221, 2233222, 2233223, 2233232, 2233233, 2233234, 2233321, 2233322, 2233323, 2233332, 2233333, 2233334, 2233343, 2233344, 2233345, 2233432, 2233433, 2233434, 2233443, 2233444, 2233445, 2233454, 2233455, 2233456, 2234321, 2234322, 2234323, 2234332, 2234333, 2234334, 2234343, 2234344, 2234345, 2234432, 2234433, 2234434, 2234443, 2234444, 2234445, 2234454, 2234455, 2234456, 2234543, 2234544, 2234545, 2234554, 2234555, 2234556, 2234565, 2234566, 2234567, 2321000, 2321001, 2321010, 2321011, 2321012, 2321100, 2321101, 2321110, 2321111, 2321112, 2321121, 2321122, 2321123, 2321210, 2321211, 2321212, 2321221, 2321222, 2321223, 2321232, 2321233, 2321234, 2322100, 2322101, 2322110, 2322111, 2322112, 2322121, 2322122, 2322123, 2322210, 2322211, 2322212, 2322221, 2322222, 2322223, 2322232, 2322233, 2322234, 2322321, 2322322, 2322323, 2322332, 2322333, 2322334, 2322343, 2322344, 2322345, 2323210, 2323211, 2323212, 2323221, 2323222, 2323223, 2323232, 2323233, 2323234, 2323321, 2323322, 2323323, 2323332, 2323333, 2323334, 2323343, 2323344, 2323345, 2323432, 2323433, 2323434, 2323443, 2323444, 2323445, 2323454, 2323455, 2323456, 2332100, 2332101, 2332110, 2332111, 2332112, 2332121, 2332122, 2332123, 2332210, 2332211, 2332212, 2332221, 2332222, 2332223, 2332232, 2332233, 2332234, 2332321, 2332322, 2332323, 2332332, 2332333, 2332334, 2332343, 2332344, 2332345, 2333210, 2333211, 2333212, 2333221, 2333222, 2333223, 2333232, 2333233, 2333234, 2333321, 2333322, 2333323, 2333332, 2333333, 2333334, 2333343, 2333344, 2333345, 2333432, 2333433, 2333434, 2333443, 2333444, 2333445, 2333454, 2333455, 2333456, 2334321, 2334322, 2334323, 2334332, 2334333, 2334334, 2334343, 2334344, 2334345, 2334432, 2334433, 2334434, 2334443, 2334444, 2334445, 2334454, 2334455, 2334456, 2334543, 2334544, 2334545, 2334554, 2334555, 2334556, 2334565, 2334566, 2334567, 2343210, 2343211, 2343212, 2343221, 2343222, 2343223, 2343232, 2343233, 2343234, 2343321, 2343322, 2343323, 2343332, 2343333, 2343334, 2343343, 2343344, 2343345, 2343432, 2343433, 2343434, 2343443, 2343444, 2343445, 2343454, 2343455, 2343456, 2344321, 2344322, 2344323, 2344332, 2344333, 2344334, 2344343, 2344344, 2344345, 2344432, 2344433, 2344434, 2344443, 2344444, 2344445, 2344454, 2344455, 2344456, 2344543, 2344544, 2344545, 2344554, 2344555, 2344556, 2344565, 2344566, 2344567, 2345432, 2345433, 2345434, 2345443, 2345444, 2345445, 2345454, 2345455, 2345456, 2345543, 2345544, 2345545, 2345554, 2345555, 2345556, 2345565, 2345566, 2345567, 2345654, 2345655, 2345656, 2345665, 2345666, 2345667, 2345676, 2345677, 2345678, 3210000, 3210001, 3210010, 3210011, 3210012, 3210100, 3210101, 3210110, 3210111, 3210112, 3210121, 3210122, 3210123, 3211000, 3211001, 3211010, 3211011, 3211012, 3211100, 3211101, 3211110, 3211111, 3211112, 3211121, 3211122, 3211123, 3211210, 3211211, 3211212, 3211221, 3211222, 3211223, 3211232, 3211233, 3211234, 3212100, 3212101, 3212110, 3212111, 3212112, 3212121, 3212122, 3212123, 3212210, 3212211, 3212212, 3212221, 3212222, 3212223, 3212232, 3212233, 3212234, 3212321, 3212322, 3212323, 3212332, 3212333, 3212334, 3212343, 3212344, 3212345, 3221000, 3221001, 3221010, 3221011, 3221012, 3221100, 3221101, 3221110, 3221111, 3221112, 3221121, 3221122, 3221123, 3221210, 3221211, 3221212, 3221221, 3221222, 3221223, 3221232, 3221233, 3221234, 3222100, 3222101, 3222110, 3222111, 3222112, 3222121, 3222122, 3222123, 3222210, 3222211, 3222212, 3222221, 3222222, 3222223, 3222232, 3222233, 3222234, 3222321, 3222322, 3222323, 3222332, 3222333, 3222334, 3222343, 3222344, 3222345, 3223210, 3223211, 3223212, 3223221, 3223222, 3223223, 3223232, 3223233, 3223234, 3223321, 3223322, 3223323, 3223332, 3223333, 3223334, 3223343, 3223344, 3223345, 3223432, 3223433, 3223434, 3223443, 3223444, 3223445, 3223454, 3223455, 3223456, 3232100, 3232101, 3232110, 3232111, 3232112, 3232121, 3232122, 3232123, 3232210, 3232211, 3232212, 3232221, 3232222, 3232223, 3232232, 3232233, 3232234, 3232321, 3232322, 3232323, 3232332, 3232333, 3232334, 3232343, 3232344, 3232345, 3233210, 3233211, 3233212, 3233221, 3233222, 3233223, 3233232, 3233233, 3233234, 3233321, 3233322, 3233323, 3233332, 3233333, 3233334, 3233343, 3233344, 3233345, 3233432, 3233433, 3233434, 3233443, 3233444, 3233445, 3233454, 3233455, 3233456, 3234321, 3234322, 3234323, 3234332, 3234333, 3234334, 3234343, 3234344, 3234345, 3234432, 3234433, 3234434, 3234443, 3234444, 3234445, 3234454, 3234455, 3234456, 3234543, 3234544, 3234545, 3234554, 3234555, 3234556, 3234565, 3234566, 3234567, 3321000, 3321001, 3321010, 3321011, 3321012, 3321100, 3321101, 3321110, 3321111, 3321112, 3321121, 3321122, 3321123, 3321210, 3321211, 3321212, 3321221, 3321222, 3321223, 3321232, 3321233, 3321234, 3322100, 3322101, 3322110, 3322111, 3322112, 3322121, 3322122, 3322123, 3322210, 3322211, 3322212, 3322221, 3322222, 3322223, 3322232, 3322233, 3322234, 3322321, 3322322, 3322323, 3322332, 3322333, 3322334, 3322343, 3322344, 3322345, 3323210, 3323211, 3323212, 3323221, 3323222, 3323223, 3323232, 3323233, 3323234, 3323321, 3323322, 3323323, 3323332, 3323333, 3323334, 3323343, 3323344, 3323345, 3323432, 3323433, 3323434, 3323443, 3323444, 3323445, 3323454, 3323455, 3323456, 3332100, 3332101, 3332110, 3332111, 3332112, 3332121, 3332122, 3332123, 3332210, 3332211, 3332212, 3332221, 3332222, 3332223, 3332232, 3332233, 3332234, 3332321, 3332322, 3332323, 3332332, 3332333, 3332334, 3332343, 3332344, 3332345, 3333210, 3333211, 3333212, 3333221, 3333222, 3333223, 3333232, 3333233, 3333234, 3333321, 3333322, 3333323, 3333332, 3333333, 3333334, 3333343, 3333344, 3333345, 3333432, 3333433, 3333434, 3333443, 3333444, 3333445, 3333454, 3333455, 3333456, 3334321, 3334322, 3334323, 3334332, 3334333, 3334334, 3334343, 3334344, 3334345, 3334432, 3334433, 3334434, 3334443, 3334444, 3334445, 3334454, 3334455, 3334456, 3334543, 3334544, 3334545, 3334554, 3334555, 3334556, 3334565, 3334566, 3334567, 3343210, 3343211, 3343212, 3343221, 3343222, 3343223, 3343232, 3343233, 3343234, 3343321, 3343322, 3343323, 3343332, 3343333, 3343334, 3343343, 3343344, 3343345, 3343432, 3343433, 3343434, 3343443, 3343444, 3343445, 3343454, 3343455, 3343456, 3344321, 3344322, 3344323, 3344332, 3344333, 3344334, 3344343, 3344344, 3344345, 3344432, 3344433, 3344434, 3344443, 3344444, 3344445, 3344454, 3344455, 3344456, 3344543, 3344544, 3344545, 3344554, 3344555, 3344556, 3344565, 3344566, 3344567, 3345432, 3345433, 3345434, 3345443, 3345444, 3345445, 3345454, 3345455, 3345456, 3345543, 3345544, 3345545, 3345554, 3345555, 3345556, 3345565, 3345566, 3345567, 3345654, 3345655, 3345656, 3345665, 3345666, 3345667, 3345676, 3345677, 3345678, 3432100, 3432101, 3432110, 3432111, 3432112, 3432121, 3432122, 3432123, 3432210, 3432211, 3432212, 3432221, 3432222, 3432223, 3432232, 3432233, 3432234, 3432321, 3432322, 3432323, 3432332, 3432333, 3432334, 3432343, 3432344, 3432345, 3433210, 3433211, 3433212, 3433221, 3433222, 3433223, 3433232, 3433233, 3433234, 3433321, 3433322, 3433323, 3433332, 3433333, 3433334, 3433343, 3433344, 3433345, 3433432, 3433433, 3433434, 3433443, 3433444, 3433445, 3433454, 3433455, 3433456, 3434321, 3434322, 3434323, 3434332, 3434333, 3434334, 3434343, 3434344, 3434345, 3434432, 3434433, 3434434, 3434443, 3434444, 3434445, 3434454, 3434455, 3434456, 3434543, 3434544, 3434545, 3434554, 3434555, 3434556, 3434565, 3434566, 3434567, 3443210, 3443211, 3443212, 3443221, 3443222, 3443223, 3443232, 3443233, 3443234, 3443321, 3443322, 3443323, 3443332, 3443333, 3443334, 3443343, 3443344, 3443345, 3443432, 3443433, 3443434, 3443443, 3443444, 3443445, 3443454, 3443455, 3443456, 3444321, 3444322, 3444323, 3444332, 3444333, 3444334, 3444343, 3444344, 3444345, 3444432, 3444433, 3444434, 3444443, 3444444, 3444445, 3444454, 3444455, 3444456, 3444543, 3444544, 3444545, 3444554, 3444555, 3444556, 3444565, 3444566, 3444567, 3445432, 3445433, 3445434, 3445443, 3445444, 3445445, 3445454, 3445455, 3445456, 3445543, 3445544, 3445545, 3445554, 3445555, 3445556, 3445565, 3445566, 3445567, 3445654, 3445655, 3445656, 3445665, 3445666, 3445667, 3445676, 3445677, 3445678, 3454321, 3454322, 3454323, 3454332, 3454333, 3454334, 3454343, 3454344, 3454345, 3454432, 3454433, 3454434, 3454443, 3454444, 3454445, 3454454, 3454455, 3454456, 3454543, 3454544, 3454545, 3454554, 3454555, 3454556, 3454565, 3454566, 3454567, 3455432, 3455433, 3455434, 3455443, 3455444, 3455445, 3455454, 3455455, 3455456, 3455543, 3455544, 3455545, 3455554, 3455555, 3455556, 3455565, 3455566, 3455567, 3455654, 3455655, 3455656, 3455665, 3455666, 3455667, 3455676, 3455677, 3455678, 3456543, 3456544, 3456545, 3456554, 3456555, 3456556, 3456565, 3456566, 3456567, 3456654, 3456655, 3456656, 3456665, 3456666, 3456667, 3456676, 3456677, 3456678, 3456765, 3456766, 3456767, 3456776, 3456777, 3456778, 3456787, 3456788, 3456789, 4321000, 4321001, 4321010, 4321011, 4321012, 4321100, 4321101, 4321110, 4321111, 4321112, 4321121, 4321122, 4321123, 4321210, 4321211, 4321212, 4321221, 4321222, 4321223, 4321232, 4321233, 4321234, 4322100, 4322101, 4322110, 4322111, 4322112, 4322121, 4322122, 4322123, 4322210, 4322211, 4322212, 4322221, 4322222, 4322223, 4322232, 4322233, 4322234, 4322321, 4322322, 4322323, 4322332, 4322333, 4322334, 4322343, 4322344, 4322345, 4323210, 4323211, 4323212, 4323221, 4323222, 4323223, 4323232, 4323233, 4323234, 4323321, 4323322, 4323323, 4323332, 4323333, 4323334, 4323343, 4323344, 4323345, 4323432, 4323433, 4323434, 4323443, 4323444, 4323445, 4323454, 4323455, 4323456, 4332100, 4332101, 4332110, 4332111, 4332112, 4332121, 4332122, 4332123, 4332210, 4332211, 4332212, 4332221, 4332222, 4332223, 4332232, 4332233, 4332234, 4332321, 4332322, 4332323, 4332332, 4332333, 4332334, 4332343, 4332344, 4332345, 4333210, 4333211, 4333212, 4333221, 4333222, 4333223, 4333232, 4333233, 4333234, 4333321, 4333322, 4333323, 4333332, 4333333, 4333334, 4333343, 4333344, 4333345, 4333432, 4333433, 4333434, 4333443, 4333444, 4333445, 4333454, 4333455, 4333456, 4334321, 4334322, 4334323, 4334332, 4334333, 4334334, 4334343, 4334344, 4334345, 4334432, 4334433, 4334434, 4334443, 4334444, 4334445, 4334454, 4334455, 4334456, 4334543, 4334544, 4334545, 4334554, 4334555, 4334556, 4334565, 4334566, 4334567, 4343210, 4343211, 4343212, 4343221, 4343222, 4343223, 4343232, 4343233, 4343234, 4343321, 4343322, 4343323, 4343332, 4343333, 4343334, 4343343, 4343344, 4343345, 4343432, 4343433, 4343434, 4343443, 4343444, 4343445, 4343454, 4343455, 4343456, 4344321, 4344322, 4344323, 4344332, 4344333, 4344334, 4344343, 4344344, 4344345, 4344432, 4344433, 4344434, 4344443, 4344444, 4344445, 4344454, 4344455, 4344456, 4344543, 4344544, 4344545, 4344554, 4344555, 4344556, 4344565, 4344566, 4344567, 4345432, 4345433, 4345434, 4345443, 4345444, 4345445, 4345454, 4345455, 4345456, 4345543, 4345544, 4345545, 4345554, 4345555, 4345556, 4345565, 4345566, 4345567, 4345654, 4345655, 4345656, 4345665, 4345666, 4345667, 4345676, 4345677, 4345678, 4432100, 4432101, 4432110, 4432111, 4432112, 4432121, 4432122, 4432123, 4432210, 4432211, 4432212, 4432221, 4432222, 4432223, 4432232, 4432233, 4432234, 4432321, 4432322, 4432323, 4432332, 4432333, 4432334, 4432343, 4432344, 4432345, 4433210, 4433211, 4433212, 4433221, 4433222, 4433223, 4433232, 4433233, 4433234, 4433321, 4433322, 4433323, 4433332, 4433333, 4433334, 4433343, 4433344, 4433345, 4433432, 4433433, 4433434, 4433443, 4433444, 4433445, 4433454, 4433455, 4433456, 4434321, 4434322, 4434323, 4434332, 4434333, 4434334, 4434343, 4434344, 4434345, 4434432, 4434433, 4434434, 4434443, 4434444, 4434445, 4434454, 4434455, 4434456, 4434543, 4434544, 4434545, 4434554, 4434555, 4434556, 4434565, 4434566, 4434567, 4443210, 4443211, 4443212, 4443221, 4443222, 4443223, 4443232, 4443233, 4443234, 4443321, 4443322, 4443323, 4443332, 4443333, 4443334, 4443343, 4443344, 4443345, 4443432, 4443433, 4443434, 4443443, 4443444, 4443445, 4443454, 4443455, 4443456, 4444321, 4444322, 4444323, 4444332, 4444333, 4444334, 4444343, 4444344, 4444345, 4444432, 4444433, 4444434, 4444443, 4444444, 4444445, 4444454, 4444455, 4444456, 4444543, 4444544, 4444545, 4444554, 4444555, 4444556, 4444565, 4444566, 4444567, 4445432, 4445433, 4445434, 4445443, 4445444, 4445445, 4445454, 4445455, 4445456, 4445543, 4445544, 4445545, 4445554, 4445555, 4445556, 4445565, 4445566, 4445567, 4445654, 4445655, 4445656, 4445665, 4445666, 4445667, 4445676, 4445677, 4445678, 4454321, 4454322, 4454323, 4454332, 4454333, 4454334, 4454343, 4454344, 4454345, 4454432, 4454433, 4454434, 4454443, 4454444, 4454445, 4454454, 4454455, 4454456, 4454543, 4454544, 4454545, 4454554, 4454555, 4454556, 4454565, 4454566, 4454567, 4455432, 4455433, 4455434, 4455443, 4455444, 4455445, 4455454, 4455455, 4455456, 4455543, 4455544, 4455545, 4455554, 4455555, 4455556, 4455565, 4455566, 4455567, 4455654, 4455655, 4455656, 4455665, 4455666, 4455667, 4455676, 4455677, 4455678, 4456543, 4456544, 4456545, 4456554, 4456555, 4456556, 4456565, 4456566, 4456567, 4456654, 4456655, 4456656, 4456665, 4456666, 4456667, 4456676, 4456677, 4456678, 4456765, 4456766, 4456767, 4456776, 4456777, 4456778, 4456787, 4456788, 4456789, 4543210, 4543211, 4543212, 4543221, 4543222, 4543223, 4543232, 4543233, 4543234, 4543321, 4543322, 4543323, 4543332, 4543333, 4543334, 4543343, 4543344, 4543345, 4543432, 4543433, 4543434, 4543443, 4543444, 4543445, 4543454, 4543455, 4543456, 4544321, 4544322, 4544323, 4544332, 4544333, 4544334, 4544343, 4544344, 4544345, 4544432, 4544433, 4544434, 4544443, 4544444, 4544445, 4544454, 4544455, 4544456, 4544543, 4544544, 4544545, 4544554, 4544555, 4544556, 4544565, 4544566, 4544567, 4545432, 4545433, 4545434, 4545443, 4545444, 4545445, 4545454, 4545455, 4545456, 4545543, 4545544, 4545545, 4545554, 4545555, 4545556, 4545565, 4545566, 4545567, 4545654, 4545655, 4545656, 4545665, 4545666, 4545667, 4545676, 4545677, 4545678, 4554321, 4554322, 4554323, 4554332, 4554333, 4554334, 4554343, 4554344, 4554345, 4554432, 4554433, 4554434, 4554443, 4554444, 4554445, 4554454, 4554455, 4554456, 4554543, 4554544, 4554545, 4554554, 4554555, 4554556, 4554565, 4554566, 4554567, 4555432, 4555433, 4555434, 4555443, 4555444, 4555445, 4555454, 4555455, 4555456, 4555543, 4555544, 4555545, 4555554, 4555555, 4555556, 4555565, 4555566, 4555567, 4555654, 4555655, 4555656, 4555665, 4555666, 4555667, 4555676, 4555677, 4555678, 4556543, 4556544, 4556545, 4556554, 4556555, 4556556, 4556565, 4556566, 4556567, 4556654, 4556655, 4556656, 4556665, 4556666, 4556667, 4556676, 4556677, 4556678, 4556765, 4556766, 4556767, 4556776, 4556777, 4556778, 4556787, 4556788, 4556789, 4565432, 4565433, 4565434, 4565443, 4565444, 4565445, 4565454, 4565455, 4565456, 4565543, 4565544, 4565545, 4565554, 4565555, 4565556, 4565565, 4565566, 4565567, 4565654, 4565655, 4565656, 4565665, 4565666, 4565667, 4565676, 4565677, 4565678, 4566543, 4566544, 4566545, 4566554, 4566555, 4566556, 4566565, 4566566, 4566567, 4566654, 4566655, 4566656, 4566665, 4566666, 4566667, 4566676, 4566677, 4566678, 4566765, 4566766, 4566767, 4566776, 4566777, 4566778, 4566787, 4566788, 4566789, 4567654, 4567655, 4567656, 4567665, 4567666, 4567667, 4567676, 4567677, 4567678, 4567765, 4567766, 4567767, 4567776, 4567777, 4567778, 4567787, 4567788, 4567789, 4567876, 4567877, 4567878, 4567887, 4567888, 4567889, 4567898, 4567899, 5432100, 5432101, 5432110, 5432111, 5432112, 5432121, 5432122, 5432123, 5432210, 5432211, 5432212, 5432221, 5432222, 5432223, 5432232, 5432233, 5432234, 5432321, 5432322, 5432323, 5432332, 5432333, 5432334, 5432343, 5432344, 5432345, 5433210, 5433211, 5433212, 5433221, 5433222, 5433223, 5433232, 5433233, 5433234, 5433321, 5433322, 5433323, 5433332, 5433333, 5433334, 5433343, 5433344, 5433345, 5433432, 5433433, 5433434, 5433443, 5433444, 5433445, 5433454, 5433455, 5433456, 5434321, 5434322, 5434323, 5434332, 5434333, 5434334, 5434343, 5434344, 5434345, 5434432, 5434433, 5434434, 5434443, 5434444, 5434445, 5434454, 5434455, 5434456, 5434543, 5434544, 5434545, 5434554, 5434555, 5434556, 5434565, 5434566, 5434567, 5443210, 5443211, 5443212, 5443221, 5443222, 5443223, 5443232, 5443233, 5443234, 5443321, 5443322, 5443323, 5443332, 5443333, 5443334, 5443343, 5443344, 5443345, 5443432, 5443433, 5443434, 5443443, 5443444, 5443445, 5443454, 5443455, 5443456, 5444321, 5444322, 5444323, 5444332, 5444333, 5444334, 5444343, 5444344, 5444345, 5444432, 5444433, 5444434, 5444443, 5444444, 5444445, 5444454, 5444455, 5444456, 5444543, 5444544, 5444545, 5444554, 5444555, 5444556, 5444565, 5444566, 5444567, 5445432, 5445433, 5445434, 5445443, 5445444, 5445445, 5445454, 5445455, 5445456, 5445543, 5445544, 5445545, 5445554, 5445555, 5445556, 5445565, 5445566, 5445567, 5445654, 5445655, 5445656, 5445665, 5445666, 5445667, 5445676, 5445677, 5445678, 5454321, 5454322, 5454323, 5454332, 5454333, 5454334, 5454343, 5454344, 5454345, 5454432, 5454433, 5454434, 5454443, 5454444, 5454445, 5454454, 5454455, 5454456, 5454543, 5454544, 5454545, 5454554, 5454555, 5454556, 5454565, 5454566, 5454567, 5455432, 5455433, 5455434, 5455443, 5455444, 5455445, 5455454, 5455455, 5455456, 5455543, 5455544, 5455545, 5455554, 5455555, 5455556, 5455565, 5455566, 5455567, 5455654, 5455655, 5455656, 5455665, 5455666, 5455667, 5455676, 5455677, 5455678, 5456543, 5456544, 5456545, 5456554, 5456555, 5456556, 5456565, 5456566, 5456567, 5456654, 5456655, 5456656, 5456665, 5456666, 5456667, 5456676, 5456677, 5456678, 5456765, 5456766, 5456767, 5456776, 5456777, 5456778, 5456787, 5456788, 5456789, 5543210, 5543211, 5543212, 5543221, 5543222, 5543223, 5543232, 5543233, 5543234, 5543321, 5543322, 5543323, 5543332, 5543333, 5543334, 5543343, 5543344, 5543345, 5543432, 5543433, 5543434, 5543443, 5543444, 5543445, 5543454, 5543455, 5543456, 5544321, 5544322, 5544323, 5544332, 5544333, 5544334, 5544343, 5544344, 5544345, 5544432, 5544433, 5544434, 5544443, 5544444, 5544445, 5544454, 5544455, 5544456, 5544543, 5544544, 5544545, 5544554, 5544555, 5544556, 5544565, 5544566, 5544567, 5545432, 5545433, 5545434, 5545443, 5545444, 5545445, 5545454, 5545455, 5545456, 5545543, 5545544, 5545545, 5545554, 5545555, 5545556, 5545565, 5545566, 5545567, 5545654, 5545655, 5545656, 5545665, 5545666, 5545667, 5545676, 5545677, 5545678, 5554321, 5554322, 5554323, 5554332, 5554333, 5554334, 5554343, 5554344, 5554345, 5554432, 5554433, 5554434, 5554443, 5554444, 5554445, 5554454, 5554455, 5554456, 5554543, 5554544, 5554545, 5554554, 5554555, 5554556, 5554565, 5554566, 5554567, 5555432, 5555433, 5555434, 5555443, 5555444, 5555445, 5555454, 5555455, 5555456, 5555543, 5555544, 5555545, 5555554, 5555555, 5555556, 5555565, 5555566, 5555567, 5555654, 5555655, 5555656, 5555665, 5555666, 5555667, 5555676, 5555677, 5555678, 5556543, 5556544, 5556545, 5556554, 5556555, 5556556, 5556565, 5556566, 5556567, 5556654, 5556655, 5556656, 5556665, 5556666, 5556667, 5556676, 5556677, 5556678, 5556765, 5556766, 5556767, 5556776, 5556777, 5556778, 5556787, 5556788, 5556789, 5565432, 5565433, 5565434, 5565443, 5565444, 5565445, 5565454, 5565455, 5565456, 5565543, 5565544, 5565545, 5565554, 5565555, 5565556, 5565565, 5565566, 5565567, 5565654, 5565655, 5565656, 5565665, 5565666, 5565667, 5565676, 5565677, 5565678, 5566543, 5566544, 5566545, 5566554, 5566555, 5566556, 5566565, 5566566, 5566567, 5566654, 5566655, 5566656, 5566665, 5566666, 5566667, 5566676, 5566677, 5566678, 5566765, 5566766, 5566767, 5566776, 5566777, 5566778, 5566787, 5566788, 5566789, 5567654, 5567655, 5567656, 5567665, 5567666, 5567667, 5567676, 5567677, 5567678, 5567765, 5567766, 5567767, 5567776, 5567777, 5567778, 5567787, 5567788, 5567789, 5567876, 5567877, 5567878, 5567887, 5567888, 5567889, 5567898, 5567899, 5654321, 5654322, 5654323, 5654332, 5654333, 5654334, 5654343, 5654344, 5654345, 5654432, 5654433, 5654434, 5654443, 5654444, 5654445, 5654454, 5654455, 5654456, 5654543, 5654544, 5654545, 5654554, 5654555, 5654556, 5654565, 5654566, 5654567, 5655432, 5655433, 5655434, 5655443, 5655444, 5655445, 5655454, 5655455, 5655456, 5655543, 5655544, 5655545, 5655554, 5655555, 5655556, 5655565, 5655566, 5655567, 5655654, 5655655, 5655656, 5655665, 5655666, 5655667, 5655676, 5655677, 5655678, 5656543, 5656544, 5656545, 5656554, 5656555, 5656556, 5656565, 5656566, 5656567, 5656654, 5656655, 5656656, 5656665, 5656666, 5656667, 5656676, 5656677, 5656678, 5656765, 5656766, 5656767, 5656776, 5656777, 5656778, 5656787, 5656788, 5656789, 5665432, 5665433, 5665434, 5665443, 5665444, 5665445, 5665454, 5665455, 5665456, 5665543, 5665544, 5665545, 5665554, 5665555, 5665556, 5665565, 5665566, 5665567, 5665654, 5665655, 5665656, 5665665, 5665666, 5665667, 5665676, 5665677, 5665678, 5666543, 5666544, 5666545, 5666554, 5666555, 5666556, 5666565, 5666566, 5666567, 5666654, 5666655, 5666656, 5666665, 5666666, 5666667, 5666676, 5666677, 5666678, 5666765, 5666766, 5666767, 5666776, 5666777, 5666778, 5666787, 5666788, 5666789, 5667654, 5667655, 5667656, 5667665, 5667666, 5667667, 5667676, 5667677, 5667678, 5667765, 5667766, 5667767, 5667776, 5667777, 5667778, 5667787, 5667788, 5667789, 5667876, 5667877, 5667878, 5667887, 5667888, 5667889, 5667898, 5667899, 5676543, 5676544, 5676545, 5676554, 5676555, 5676556, 5676565, 5676566, 5676567, 5676654, 5676655, 5676656, 5676665, 5676666, 5676667, 5676676, 5676677, 5676678, 5676765, 5676766, 5676767, 5676776, 5676777, 5676778, 5676787, 5676788, 5676789, 5677654, 5677655, 5677656, 5677665, 5677666, 5677667, 5677676, 5677677, 5677678, 5677765, 5677766, 5677767, 5677776, 5677777, 5677778, 5677787, 5677788, 5677789, 5677876, 5677877, 5677878, 5677887, 5677888, 5677889, 5677898, 5677899, 5678765, 5678766, 5678767, 5678776, 5678777, 5678778, 5678787, 5678788, 5678789, 5678876, 5678877, 5678878, 5678887, 5678888, 5678889, 5678898, 5678899, 5678987, 5678988, 5678989, 5678998, 5678999, 6543210, 6543211, 6543212, 6543221, 6543222, 6543223, 6543232, 6543233, 6543234, 6543321, 6543322, 6543323, 6543332, 6543333, 6543334, 6543343, 6543344, 6543345, 6543432, 6543433, 6543434, 6543443, 6543444, 6543445, 6543454, 6543455, 6543456, 6544321, 6544322, 6544323, 6544332, 6544333, 6544334, 6544343, 6544344, 6544345, 6544432, 6544433, 6544434, 6544443, 6544444, 6544445, 6544454, 6544455, 6544456, 6544543, 6544544, 6544545, 6544554, 6544555, 6544556, 6544565, 6544566, 6544567, 6545432, 6545433, 6545434, 6545443, 6545444, 6545445, 6545454, 6545455, 6545456, 6545543, 6545544, 6545545, 6545554, 6545555, 6545556, 6545565, 6545566, 6545567, 6545654, 6545655, 6545656, 6545665, 6545666, 6545667, 6545676, 6545677, 6545678, 6554321, 6554322, 6554323, 6554332, 6554333, 6554334, 6554343, 6554344, 6554345, 6554432, 6554433, 6554434, 6554443, 6554444, 6554445, 6554454, 6554455, 6554456, 6554543, 6554544, 6554545, 6554554, 6554555, 6554556, 6554565, 6554566, 6554567, 6555432, 6555433, 6555434, 6555443, 6555444, 6555445, 6555454, 6555455, 6555456, 6555543, 6555544, 6555545, 6555554, 6555555, 6555556, 6555565, 6555566, 6555567, 6555654, 6555655, 6555656, 6555665, 6555666, 6555667, 6555676, 6555677, 6555678, 6556543, 6556544, 6556545, 6556554, 6556555, 6556556, 6556565, 6556566, 6556567, 6556654, 6556655, 6556656, 6556665, 6556666, 6556667, 6556676, 6556677, 6556678, 6556765, 6556766, 6556767, 6556776, 6556777, 6556778, 6556787, 6556788, 6556789, 6565432, 6565433, 6565434, 6565443, 6565444, 6565445, 6565454, 6565455, 6565456, 6565543, 6565544, 6565545, 6565554, 6565555, 6565556, 6565565, 6565566, 6565567, 6565654, 6565655, 6565656, 6565665, 6565666, 6565667, 6565676, 6565677, 6565678, 6566543, 6566544, 6566545, 6566554, 6566555, 6566556, 6566565, 6566566, 6566567, 6566654, 6566655, 6566656, 6566665, 6566666, 6566667, 6566676, 6566677, 6566678, 6566765, 6566766, 6566767, 6566776, 6566777, 6566778, 6566787, 6566788, 6566789, 6567654, 6567655, 6567656, 6567665, 6567666, 6567667, 6567676, 6567677, 6567678, 6567765, 6567766, 6567767, 6567776, 6567777, 6567778, 6567787, 6567788, 6567789, 6567876, 6567877, 6567878, 6567887, 6567888, 6567889, 6567898, 6567899, 6654321, 6654322, 6654323, 6654332, 6654333, 6654334, 6654343, 6654344, 6654345, 6654432, 6654433, 6654434, 6654443, 6654444, 6654445, 6654454, 6654455, 6654456, 6654543, 6654544, 6654545, 6654554, 6654555, 6654556, 6654565, 6654566, 6654567, 6655432, 6655433, 6655434, 6655443, 6655444, 6655445, 6655454, 6655455, 6655456, 6655543, 6655544, 6655545, 6655554, 6655555, 6655556, 6655565, 6655566, 6655567, 6655654, 6655655, 6655656, 6655665, 6655666, 6655667, 6655676, 6655677, 6655678, 6656543, 6656544, 6656545, 6656554, 6656555, 6656556, 6656565, 6656566, 6656567, 6656654, 6656655, 6656656, 6656665, 6656666, 6656667, 6656676, 6656677, 6656678, 6656765, 6656766, 6656767, 6656776, 6656777, 6656778, 6656787, 6656788, 6656789, 6665432, 6665433, 6665434, 6665443, 6665444, 6665445, 6665454, 6665455, 6665456, 6665543, 6665544, 6665545, 6665554, 6665555, 6665556, 6665565, 6665566, 6665567, 6665654, 6665655, 6665656, 6665665, 6665666, 6665667, 6665676, 6665677, 6665678, 6666543, 6666544, 6666545, 6666554, 6666555, 6666556, 6666565, 6666566, 6666567, 6666654, 6666655, 6666656, 6666665, 6666666, 6666667, 6666676, 6666677, 6666678, 6666765, 6666766, 6666767, 6666776, 6666777, 6666778, 6666787, 6666788, 6666789, 6667654, 6667655, 6667656, 6667665, 6667666, 6667667, 6667676, 6667677, 6667678, 6667765, 6667766, 6667767, 6667776, 6667777, 6667778, 6667787, 6667788, 6667789, 6667876, 6667877, 6667878, 6667887, 6667888, 6667889, 6667898, 6667899, 6676543, 6676544, 6676545, 6676554, 6676555, 6676556, 6676565, 6676566, 6676567, 6676654, 6676655, 6676656, 6676665, 6676666, 6676667, 6676676, 6676677, 6676678, 6676765, 6676766, 6676767, 6676776, 6676777, 6676778, 6676787, 6676788, 6676789, 6677654, 6677655, 6677656, 6677665, 6677666, 6677667, 6677676, 6677677, 6677678, 6677765, 6677766, 6677767, 6677776, 6677777, 6677778, 6677787, 6677788, 6677789, 6677876, 6677877, 6677878, 6677887, 6677888, 6677889, 6677898, 6677899, 6678765, 6678766, 6678767, 6678776, 6678777, 6678778, 6678787, 6678788, 6678789, 6678876, 6678877, 6678878, 6678887, 6678888, 6678889, 6678898, 6678899, 6678987, 6678988, 6678989, 6678998, 6678999, 6765432, 6765433, 6765434, 6765443, 6765444, 6765445, 6765454, 6765455, 6765456, 6765543, 6765544, 6765545, 6765554, 6765555, 6765556, 6765565, 6765566, 6765567, 6765654, 6765655, 6765656, 6765665, 6765666, 6765667, 6765676, 6765677, 6765678, 6766543, 6766544, 6766545, 6766554, 6766555, 6766556, 6766565, 6766566, 6766567, 6766654, 6766655, 6766656, 6766665, 6766666, 6766667, 6766676, 6766677, 6766678, 6766765, 6766766, 6766767, 6766776, 6766777, 6766778, 6766787, 6766788, 6766789, 6767654, 6767655, 6767656, 6767665, 6767666, 6767667, 6767676, 6767677, 6767678, 6767765, 6767766, 6767767, 6767776, 6767777, 6767778, 6767787, 6767788, 6767789, 6767876, 6767877, 6767878, 6767887, 6767888, 6767889, 6767898, 6767899, 6776543, 6776544, 6776545, 6776554, 6776555, 6776556, 6776565, 6776566, 6776567, 6776654, 6776655, 6776656, 6776665, 6776666, 6776667, 6776676, 6776677, 6776678, 6776765, 6776766, 6776767, 6776776, 6776777, 6776778, 6776787, 6776788, 6776789, 6777654, 6777655, 6777656, 6777665, 6777666, 6777667, 6777676, 6777677, 6777678, 6777765, 6777766, 6777767, 6777776, 6777777, 6777778, 6777787, 6777788, 6777789, 6777876, 6777877, 6777878, 6777887, 6777888, 6777889, 6777898, 6777899, 6778765, 6778766, 6778767, 6778776, 6778777, 6778778, 6778787, 6778788, 6778789, 6778876, 6778877, 6778878, 6778887, 6778888, 6778889, 6778898, 6778899, 6778987, 6778988, 6778989, 6778998, 6778999, 6787654, 6787655, 6787656, 6787665, 6787666, 6787667, 6787676, 6787677, 6787678, 6787765, 6787766, 6787767, 6787776, 6787777, 6787778, 6787787, 6787788, 6787789, 6787876, 6787877, 6787878, 6787887, 6787888, 6787889, 6787898, 6787899, 6788765, 6788766, 6788767, 6788776, 6788777, 6788778, 6788787, 6788788, 6788789, 6788876, 6788877, 6788878, 6788887, 6788888, 6788889, 6788898, 6788899, 6788987, 6788988, 6788989, 6788998, 6788999, 6789876, 6789877, 6789878, 6789887, 6789888, 6789889, 6789898, 6789899, 6789987, 6789988, 6789989, 6789998, 6789999, 7654321, 7654322, 7654323, 7654332, 7654333, 7654334, 7654343, 7654344, 7654345, 7654432, 7654433, 7654434, 7654443, 7654444, 7654445, 7654454, 7654455, 7654456, 7654543, 7654544, 7654545, 7654554, 7654555, 7654556, 7654565, 7654566, 7654567, 7655432, 7655433, 7655434, 7655443, 7655444, 7655445, 7655454, 7655455, 7655456, 7655543, 7655544, 7655545, 7655554, 7655555, 7655556, 7655565, 7655566, 7655567, 7655654, 7655655, 7655656, 7655665, 7655666, 7655667, 7655676, 7655677, 7655678, 7656543, 7656544, 7656545, 7656554, 7656555, 7656556, 7656565, 7656566, 7656567, 7656654, 7656655, 7656656, 7656665, 7656666, 7656667, 7656676, 7656677, 7656678, 7656765, 7656766, 7656767, 7656776, 7656777, 7656778, 7656787, 7656788, 7656789, 7665432, 7665433, 7665434, 7665443, 7665444, 7665445, 7665454, 7665455, 7665456, 7665543, 7665544, 7665545, 7665554, 7665555, 7665556, 7665565, 7665566, 7665567, 7665654, 7665655, 7665656, 7665665, 7665666, 7665667, 7665676, 7665677, 7665678, 7666543, 7666544, 7666545, 7666554, 7666555, 7666556, 7666565, 7666566, 7666567, 7666654, 7666655, 7666656, 7666665, 7666666, 7666667, 7666676, 7666677, 7666678, 7666765, 7666766, 7666767, 7666776, 7666777, 7666778, 7666787, 7666788, 7666789, 7667654, 7667655, 7667656, 7667665, 7667666, 7667667, 7667676, 7667677, 7667678, 7667765, 7667766, 7667767, 7667776, 7667777, 7667778, 7667787, 7667788, 7667789, 7667876, 7667877, 7667878, 7667887, 7667888, 7667889, 7667898, 7667899, 7676543, 7676544, 7676545, 7676554, 7676555, 7676556, 7676565, 7676566, 7676567, 7676654, 7676655, 7676656, 7676665, 7676666, 7676667, 7676676, 7676677, 7676678, 7676765, 7676766, 7676767, 7676776, 7676777, 7676778, 7676787, 7676788, 7676789, 7677654, 7677655, 7677656, 7677665, 7677666, 7677667, 7677676, 7677677, 7677678, 7677765, 7677766, 7677767, 7677776, 7677777, 7677778, 7677787, 7677788, 7677789, 7677876, 7677877, 7677878, 7677887, 7677888, 7677889, 7677898, 7677899, 7678765, 7678766, 7678767, 7678776, 7678777, 7678778, 7678787, 7678788, 7678789, 7678876, 7678877, 7678878, 7678887, 7678888, 7678889, 7678898, 7678899, 7678987, 7678988, 7678989, 7678998, 7678999, 7765432, 7765433, 7765434, 7765443, 7765444, 7765445, 7765454, 7765455, 7765456, 7765543, 7765544, 7765545, 7765554, 7765555, 7765556, 7765565, 7765566, 7765567, 7765654, 7765655, 7765656, 7765665, 7765666, 7765667, 7765676, 7765677, 7765678, 7766543, 7766544, 7766545, 7766554, 7766555, 7766556, 7766565, 7766566, 7766567, 7766654, 7766655, 7766656, 7766665, 7766666, 7766667, 7766676, 7766677, 7766678, 7766765, 7766766, 7766767, 7766776, 7766777, 7766778, 7766787, 7766788, 7766789, 7767654, 7767655, 7767656, 7767665, 7767666, 7767667, 7767676, 7767677, 7767678, 7767765, 7767766, 7767767, 7767776, 7767777, 7767778, 7767787, 7767788, 7767789, 7767876, 7767877, 7767878, 7767887, 7767888, 7767889, 7767898, 7767899, 7776543, 7776544, 7776545, 7776554, 7776555, 7776556, 7776565, 7776566, 7776567, 7776654, 7776655, 7776656, 7776665, 7776666, 7776667, 7776676, 7776677, 7776678, 7776765, 7776766, 7776767, 7776776, 7776777, 7776778, 7776787, 7776788, 7776789, 7777654, 7777655, 7777656, 7777665, 7777666, 7777667, 7777676, 7777677, 7777678, 7777765, 7777766, 7777767, 7777776, 7777777, 7777778, 7777787, 7777788, 7777789, 7777876, 7777877, 7777878, 7777887, 7777888, 7777889, 7777898, 7777899, 7778765, 7778766, 7778767, 7778776, 7778777, 7778778, 7778787, 7778788, 7778789, 7778876, 7778877, 7778878, 7778887, 7778888, 7778889, 7778898, 7778899, 7778987, 7778988, 7778989, 7778998, 7778999, 7787654, 7787655, 7787656, 7787665, 7787666, 7787667, 7787676, 7787677, 7787678, 7787765, 7787766, 7787767, 7787776, 7787777, 7787778, 7787787, 7787788, 7787789, 7787876, 7787877, 7787878, 7787887, 7787888, 7787889, 7787898, 7787899, 7788765, 7788766, 7788767, 7788776, 7788777, 7788778, 7788787, 7788788, 7788789, 7788876, 7788877, 7788878, 7788887, 7788888, 7788889, 7788898, 7788899, 7788987, 7788988, 7788989, 7788998, 7788999, 7789876, 7789877, 7789878, 7789887, 7789888, 7789889, 7789898, 7789899, 7789987, 7789988, 7789989, 7789998, 7789999, 7876543, 7876544, 7876545, 7876554, 7876555, 7876556, 7876565, 7876566, 7876567, 7876654, 7876655, 7876656, 7876665, 7876666, 7876667, 7876676, 7876677, 7876678, 7876765, 7876766, 7876767, 7876776, 7876777, 7876778, 7876787, 7876788, 7876789, 7877654, 7877655, 7877656, 7877665, 7877666, 7877667, 7877676, 7877677, 7877678, 7877765, 7877766, 7877767, 7877776, 7877777, 7877778, 7877787, 7877788, 7877789, 7877876, 7877877, 7877878, 7877887, 7877888, 7877889, 7877898, 7877899, 7878765, 7878766, 7878767, 7878776, 7878777, 7878778, 7878787, 7878788, 7878789, 7878876, 7878877, 7878878, 7878887, 7878888, 7878889, 7878898, 7878899, 7878987, 7878988, 7878989, 7878998, 7878999, 7887654, 7887655, 7887656, 7887665, 7887666, 7887667, 7887676, 7887677, 7887678, 7887765, 7887766, 7887767, 7887776, 7887777, 7887778, 7887787, 7887788, 7887789, 7887876, 7887877, 7887878, 7887887, 7887888, 7887889, 7887898, 7887899, 7888765, 7888766, 7888767, 7888776, 7888777, 7888778, 7888787, 7888788, 7888789, 7888876, 7888877, 7888878, 7888887, 7888888, 7888889, 7888898, 7888899, 7888987, 7888988, 7888989, 7888998, 7888999, 7889876, 7889877, 7889878, 7889887, 7889888, 7889889, 7889898, 7889899, 7889987, 7889988, 7889989, 7889998, 7889999, 7898765, 7898766, 7898767, 7898776, 7898777, 7898778, 7898787, 7898788, 7898789, 7898876, 7898877, 7898878, 7898887, 7898888, 7898889, 7898898, 7898899, 7898987, 7898988, 7898989, 7898998, 7898999, 7899876, 7899877, 7899878, 7899887, 7899888, 7899889, 7899898, 7899899, 7899987, 7899988, 7899989, 7899998, 7899999, 8765432, 8765433, 8765434, 8765443, 8765444, 8765445, 8765454, 8765455, 8765456, 8765543, 8765544, 8765545, 8765554, 8765555, 8765556, 8765565, 8765566, 8765567, 8765654, 8765655, 8765656, 8765665, 8765666, 8765667, 8765676, 8765677, 8765678, 8766543, 8766544, 8766545, 8766554, 8766555, 8766556, 8766565, 8766566, 8766567, 8766654, 8766655, 8766656, 8766665, 8766666, 8766667, 8766676, 8766677, 8766678, 8766765, 8766766, 8766767, 8766776, 8766777, 8766778, 8766787, 8766788, 8766789, 8767654, 8767655, 8767656, 8767665, 8767666, 8767667, 8767676, 8767677, 8767678, 8767765, 8767766, 8767767, 8767776, 8767777, 8767778, 8767787, 8767788, 8767789, 8767876, 8767877, 8767878, 8767887, 8767888, 8767889, 8767898, 8767899, 8776543, 8776544, 8776545, 8776554, 8776555, 8776556, 8776565, 8776566, 8776567, 8776654, 8776655, 8776656, 8776665, 8776666, 8776667, 8776676, 8776677, 8776678, 8776765, 8776766, 8776767, 8776776, 8776777, 8776778, 8776787, 8776788, 8776789, 8777654, 8777655, 8777656, 8777665, 8777666, 8777667, 8777676, 8777677, 8777678, 8777765, 8777766, 8777767, 8777776, 8777777, 8777778, 8777787, 8777788, 8777789, 8777876, 8777877, 8777878, 8777887, 8777888, 8777889, 8777898, 8777899, 8778765, 8778766, 8778767, 8778776, 8778777, 8778778, 8778787, 8778788, 8778789, 8778876, 8778877, 8778878, 8778887, 8778888, 8778889, 8778898, 8778899, 8778987, 8778988, 8778989, 8778998, 8778999, 8787654, 8787655, 8787656, 8787665, 8787666, 8787667, 8787676, 8787677, 8787678, 8787765, 8787766, 8787767, 8787776, 8787777, 8787778, 8787787, 8787788, 8787789, 8787876, 8787877, 8787878, 8787887, 8787888, 8787889, 8787898, 8787899, 8788765, 8788766, 8788767, 8788776, 8788777, 8788778, 8788787, 8788788, 8788789, 8788876, 8788877, 8788878, 8788887, 8788888, 8788889, 8788898, 8788899, 8788987, 8788988, 8788989, 8788998, 8788999, 8789876, 8789877, 8789878, 8789887, 8789888, 8789889, 8789898, 8789899, 8789987, 8789988, 8789989, 8789998, 8789999, 8876543, 8876544, 8876545, 8876554, 8876555, 8876556, 8876565, 8876566, 8876567, 8876654, 8876655, 8876656, 8876665, 8876666, 8876667, 8876676, 8876677, 8876678, 8876765, 8876766, 8876767, 8876776, 8876777, 8876778, 8876787, 8876788, 8876789, 8877654, 8877655, 8877656, 8877665, 8877666, 8877667, 8877676, 8877677, 8877678, 8877765, 8877766, 8877767, 8877776, 8877777, 8877778, 8877787, 8877788, 8877789, 8877876, 8877877, 8877878, 8877887, 8877888, 8877889, 8877898, 8877899, 8878765, 8878766, 8878767, 8878776, 8878777, 8878778, 8878787, 8878788, 8878789, 8878876, 8878877, 8878878, 8878887, 8878888, 8878889, 8878898, 8878899, 8878987, 8878988, 8878989, 8878998, 8878999, 8887654, 8887655, 8887656, 8887665, 8887666, 8887667, 8887676, 8887677, 8887678, 8887765, 8887766, 8887767, 8887776, 8887777, 8887778, 8887787, 8887788, 8887789, 8887876, 8887877, 8887878, 8887887, 8887888, 8887889, 8887898, 8887899, 8888765, 8888766, 8888767, 8888776, 8888777, 8888778, 8888787, 8888788, 8888789, 8888876, 8888877, 8888878, 8888887, 8888888, 8888889, 8888898, 8888899, 8888987, 8888988, 8888989, 8888998, 8888999, 8889876, 8889877, 8889878, 8889887, 8889888, 8889889, 8889898, 8889899, 8889987, 8889988, 8889989, 8889998, 8889999, 8898765, 8898766, 8898767, 8898776, 8898777, 8898778, 8898787, 8898788, 8898789, 8898876, 8898877, 8898878, 8898887, 8898888, 8898889, 8898898, 8898899, 8898987, 8898988, 8898989, 8898998, 8898999, 8899876, 8899877, 8899878, 8899887, 8899888, 8899889, 8899898, 8899899, 8899987, 8899988, 8899989, 8899998, 8899999, 8987654, 8987655, 8987656, 8987665, 8987666, 8987667, 8987676, 8987677, 8987678, 8987765, 8987766, 8987767, 8987776, 8987777, 8987778, 8987787, 8987788, 8987789, 8987876, 8987877, 8987878, 8987887, 8987888, 8987889, 8987898, 8987899, 8988765, 8988766, 8988767, 8988776, 8988777, 8988778, 8988787, 8988788, 8988789, 8988876, 8988877, 8988878, 8988887, 8988888, 8988889, 8988898, 8988899, 8988987, 8988988, 8988989, 8988998, 8988999, 8989876, 8989877, 8989878, 8989887, 8989888, 8989889, 8989898, 8989899, 8989987, 8989988, 8989989, 8989998, 8989999, 8998765, 8998766, 8998767, 8998776, 8998777, 8998778, 8998787, 8998788, 8998789, 8998876, 8998877, 8998878, 8998887, 8998888, 8998889, 8998898, 8998899, 8998987, 8998988, 8998989, 8998998, 8998999, 8999876, 8999877, 8999878, 8999887, 8999888, 8999889, 8999898, 8999899, 8999987, 8999988, 8999989, 8999998, 8999999, 9876543, 9876544, 9876545, 9876554, 9876555, 9876556, 9876565, 9876566, 9876567, 9876654, 9876655, 9876656, 9876665, 9876666, 9876667, 9876676, 9876677, 9876678, 9876765, 9876766, 9876767, 9876776, 9876777, 9876778, 9876787, 9876788, 9876789, 9877654, 9877655, 9877656, 9877665, 9877666, 9877667, 9877676, 9877677, 9877678, 9877765, 9877766, 9877767, 9877776, 9877777, 9877778, 9877787, 9877788, 9877789, 9877876, 9877877, 9877878, 9877887, 9877888, 9877889, 9877898, 9877899, 9878765, 9878766, 9878767, 9878776, 9878777, 9878778, 9878787, 9878788, 9878789, 9878876, 9878877, 9878878, 9878887, 9878888, 9878889, 9878898, 9878899, 9878987, 9878988, 9878989, 9878998, 9878999, 9887654, 9887655, 9887656, 9887665, 9887666, 9887667, 9887676, 9887677, 9887678, 9887765, 9887766, 9887767, 9887776, 9887777, 9887778, 9887787, 9887788, 9887789, 9887876, 9887877, 9887878, 9887887, 9887888, 9887889, 9887898, 9887899, 9888765, 9888766, 9888767, 9888776, 9888777, 9888778, 9888787, 9888788, 9888789, 9888876, 9888877, 9888878, 9888887, 9888888, 9888889, 9888898, 9888899, 9888987, 9888988, 9888989, 9888998, 9888999, 9889876, 9889877, 9889878, 9889887, 9889888, 9889889, 9889898, 9889899, 9889987, 9889988, 9889989, 9889998, 9889999, 9898765, 9898766, 9898767, 9898776, 9898777, 9898778, 9898787, 9898788, 9898789, 9898876, 9898877, 9898878, 9898887, 9898888, 9898889, 9898898, 9898899, 9898987, 9898988, 9898989, 9898998, 9898999, 9899876, 9899877, 9899878, 9899887, 9899888, 9899889, 9899898, 9899899, 9899987, 9899988, 9899989, 9899998, 9899999, 9987654, 9987655, 9987656, 9987665, 9987666, 9987667, 9987676, 9987677, 9987678, 9987765, 9987766, 9987767, 9987776, 9987777, 9987778, 9987787, 9987788, 9987789, 9987876, 9987877, 9987878, 9987887, 9987888, 9987889, 9987898, 9987899, 9988765, 9988766, 9988767, 9988776, 9988777, 9988778, 9988787, 9988788, 9988789, 9988876, 9988877, 9988878, 9988887, 9988888, 9988889, 9988898, 9988899, 9988987, 9988988, 9988989, 9988998, 9988999, 9989876, 9989877, 9989878, 9989887, 9989888, 9989889, 9989898, 9989899, 9989987, 9989988, 9989989, 9989998, 9989999, 9998765, 9998766, 9998767, 9998776, 9998777, 9998778, 9998787, 9998788, 9998789, 9998876, 9998877, 9998878, 9998887, 9998888, 9998889, 9998898, 9998899, 9998987, 9998988, 9998989, 9998998, 9998999, 9999876, 9999877, 9999878, 9999887, 9999888, 9999889, 9999898, 9999899, 9999987, 9999988, 9999989, 9999998, 9999999, 10000000, 10000001, 10000010, 10000011, 10000012, 10000100, 10000101, 10000110, 10000111, 10000112, 10000121, 10000122, 10000123, 10001000, 10001001, 10001010, 10001011, 10001012, 10001100, 10001101, 10001110, 10001111, 10001112, 10001121, 10001122, 10001123, 10001210, 10001211, 10001212, 10001221, 10001222, 10001223, 10001232, 10001233, 10001234, 10010000, 10010001, 10010010, 10010011, 10010012, 10010100, 10010101, 10010110, 10010111, 10010112, 10010121, 10010122, 10010123, 10011000, 10011001, 10011010, 10011011, 10011012, 10011100, 10011101, 10011110, 10011111, 10011112, 10011121, 10011122, 10011123, 10011210, 10011211, 10011212, 10011221, 10011222, 10011223, 10011232, 10011233, 10011234, 10012100, 10012101, 10012110, 10012111, 10012112, 10012121, 10012122, 10012123, 10012210, 10012211, 10012212, 10012221, 10012222, 10012223, 10012232, 10012233, 10012234, 10012321, 10012322, 10012323, 10012332, 10012333, 10012334, 10012343, 10012344, 10012345, 10100000, 10100001, 10100010, 10100011, 10100012, 10100100, 10100101, 10100110, 10100111, 10100112, 10100121, 10100122, 10100123, 10101000, 10101001, 10101010, 10101011, 10101012, 10101100, 10101101, 10101110, 10101111, 10101112, 10101121, 10101122, 10101123, 10101210, 10101211, 10101212, 10101221, 10101222, 10101223, 10101232, 10101233, 10101234, 10110000, 10110001, 10110010, 10110011, 10110012, 10110100, 10110101, 10110110, 10110111, 10110112, 10110121, 10110122, 10110123, 10111000, 10111001, 10111010, 10111011, 10111012, 10111100, 10111101, 10111110, 10111111, 10111112, 10111121, 10111122, 10111123, 10111210, 10111211, 10111212, 10111221, 10111222, 10111223, 10111232, 10111233, 10111234, 10112100, 10112101, 10112110, 10112111, 10112112, 10112121, 10112122, 10112123, 10112210, 10112211, 10112212, 10112221, 10112222, 10112223, 10112232, 10112233, 10112234, 10112321, 10112322, 10112323, 10112332, 10112333, 10112334, 10112343, 10112344, 10112345, 10121000, 10121001, 10121010, 10121011, 10121012, 10121100, 10121101, 10121110, 10121111, 10121112, 10121121, 10121122, 10121123, 10121210, 10121211, 10121212, 10121221, 10121222, 10121223, 10121232, 10121233, 10121234, 10122100, 10122101, 10122110, 10122111, 10122112, 10122121, 10122122, 10122123, 10122210, 10122211, 10122212, 10122221, 10122222, 10122223, 10122232, 10122233, 10122234, 10122321, 10122322, 10122323, 10122332, 10122333, 10122334, 10122343, 10122344, 10122345, 10123210, 10123211, 10123212, 10123221, 10123222, 10123223, 10123232, 10123233, 10123234, 10123321, 10123322, 10123323, 10123332, 10123333, 10123334, 10123343, 10123344, 10123345, 10123432, 10123433, 10123434, 10123443, 10123444, 10123445, 10123454, 10123455, 10123456, 11000000, 11000001, 11000010, 11000011, 11000012, 11000100, 11000101, 11000110, 11000111, 11000112, 11000121, 11000122, 11000123, 11001000, 11001001, 11001010, 11001011, 11001012, 11001100, 11001101, 11001110, 11001111, 11001112, 11001121, 11001122, 11001123, 11001210, 11001211, 11001212, 11001221, 11001222, 11001223, 11001232, 11001233, 11001234, 11010000, 11010001, 11010010, 11010011, 11010012, 11010100, 11010101, 11010110, 11010111, 11010112, 11010121, 11010122, 11010123, 11011000, 11011001, 11011010, 11011011, 11011012, 11011100, 11011101, 11011110, 11011111, 11011112, 11011121, 11011122, 11011123, 11011210, 11011211, 11011212, 11011221, 11011222, 11011223, 11011232, 11011233, 11011234, 11012100, 11012101, 11012110, 11012111, 11012112, 11012121, 11012122, 11012123, 11012210, 11012211, 11012212, 11012221, 11012222, 11012223, 11012232, 11012233, 11012234, 11012321, 11012322, 11012323, 11012332, 11012333, 11012334, 11012343, 11012344, 11012345, 11100000, 11100001, 11100010, 11100011, 11100012, 11100100, 11100101, 11100110, 11100111, 11100112, 11100121, 11100122, 11100123, 11101000, 11101001, 11101010, 11101011, 11101012, 11101100, 11101101, 11101110, 11101111, 11101112, 11101121, 11101122, 11101123, 11101210, 11101211, 11101212, 11101221, 11101222, 11101223, 11101232, 11101233, 11101234, 11110000, 11110001, 11110010, 11110011, 11110012, 11110100, 11110101, 11110110, 11110111, 11110112, 11110121, 11110122, 11110123, 11111000, 11111001, 11111010, 11111011, 11111012, 11111100, 11111101, 11111110, 11111111, 11111112, 11111121, 11111122, 11111123, 11111210, 11111211, 11111212, 11111221, 11111222, 11111223, 11111232, 11111233, 11111234, 11112100, 11112101, 11112110, 11112111, 11112112, 11112121, 11112122, 11112123, 11112210, 11112211, 11112212, 11112221, 11112222, 11112223, 11112232, 11112233, 11112234, 11112321, 11112322, 11112323, 11112332, 11112333, 11112334, 11112343, 11112344, 11112345, 11121000, 11121001, 11121010, 11121011, 11121012, 11121100, 11121101, 11121110, 11121111, 11121112, 11121121, 11121122, 11121123, 11121210, 11121211, 11121212, 11121221, 11121222, 11121223, 11121232, 11121233, 11121234, 11122100, 11122101, 11122110, 11122111, 11122112, 11122121, 11122122, 11122123, 11122210, 11122211, 11122212, 11122221, 11122222, 11122223, 11122232, 11122233, 11122234, 11122321, 11122322, 11122323, 11122332, 11122333, 11122334, 11122343, 11122344, 11122345, 11123210, 11123211, 11123212, 11123221, 11123222, 11123223, 11123232, 11123233, 11123234, 11123321, 11123322, 11123323, 11123332, 11123333, 11123334, 11123343, 11123344, 11123345, 11123432, 11123433, 11123434, 11123443, 11123444, 11123445, 11123454, 11123455, 11123456, 11210000, 11210001, 11210010, 11210011, 11210012, 11210100, 11210101, 11210110, 11210111, 11210112, 11210121, 11210122, 11210123, 11211000, 11211001, 11211010, 11211011, 11211012, 11211100, 11211101, 11211110, 11211111, 11211112, 11211121, 11211122, 11211123, 11211210, 11211211, 11211212, 11211221, 11211222, 11211223, 11211232, 11211233, 11211234, 11212100, 11212101, 11212110, 11212111, 11212112, 11212121, 11212122, 11212123, 11212210, 11212211, 11212212, 11212221, 11212222, 11212223, 11212232, 11212233, 11212234, 11212321, 11212322, 11212323, 11212332, 11212333, 11212334, 11212343, 11212344, 11212345, 11221000, 11221001, 11221010, 11221011, 11221012, 11221100, 11221101, 11221110, 11221111, 11221112, 11221121, 11221122, 11221123, 11221210, 11221211, 11221212, 11221221, 11221222, 11221223, 11221232, 11221233, 11221234, 11222100, 11222101, 11222110, 11222111, 11222112, 11222121, 11222122, 11222123, 11222210, 11222211, 11222212, 11222221, 11222222, 11222223, 11222232, 11222233, 11222234, 11222321, 11222322, 11222323, 11222332, 11222333, 11222334, 11222343, 11222344, 11222345, 11223210, 11223211, 11223212, 11223221, 11223222, 11223223, 11223232, 11223233, 11223234, 11223321, 11223322, 11223323, 11223332, 11223333, 11223334, 11223343, 11223344, 11223345, 11223432, 11223433, 11223434, 11223443, 11223444, 11223445, 11223454, 11223455, 11223456, 11232100, 11232101, 11232110, 11232111, 11232112, 11232121, 11232122, 11232123, 11232210, 11232211, 11232212, 11232221, 11232222, 11232223, 11232232, 11232233, 11232234, 11232321, 11232322, 11232323, 11232332, 11232333, 11232334, 11232343, 11232344, 11232345, 11233210, 11233211, 11233212, 11233221, 11233222, 11233223, 11233232, 11233233, 11233234, 11233321, 11233322, 11233323, 11233332, 11233333, 11233334, 11233343, 11233344, 11233345, 11233432, 11233433, 11233434, 11233443, 11233444, 11233445, 11233454, 11233455, 11233456, 11234321, 11234322, 11234323, 11234332, 11234333, 11234334, 11234343, 11234344, 11234345, 11234432, 11234433, 11234434, 11234443, 11234444, 11234445, 11234454, 11234455, 11234456, 11234543, 11234544, 11234545, 11234554, 11234555, 11234556, 11234565, 11234566, 11234567, 12100000, 12100001, 12100010, 12100011, 12100012, 12100100, 12100101, 12100110, 12100111, 12100112, 12100121, 12100122, 12100123, 12101000, 12101001, 12101010, 12101011, 12101012, 12101100, 12101101, 12101110, 12101111, 12101112, 12101121, 12101122, 12101123, 12101210, 12101211, 12101212, 12101221, 12101222, 12101223, 12101232, 12101233, 12101234, 12110000, 12110001, 12110010, 12110011, 12110012, 12110100, 12110101, 12110110, 12110111, 12110112, 12110121, 12110122, 12110123, 12111000, 12111001, 12111010, 12111011, 12111012, 12111100, 12111101, 12111110, 12111111, 12111112, 12111121, 12111122, 12111123, 12111210, 12111211, 12111212, 12111221, 12111222, 12111223, 12111232, 12111233, 12111234, 12112100, 12112101, 12112110, 12112111, 12112112, 12112121, 12112122, 12112123, 12112210, 12112211, 12112212, 12112221, 12112222, 12112223, 12112232, 12112233, 12112234, 12112321, 12112322, 12112323, 12112332, 12112333, 12112334, 12112343, 12112344, 12112345, 12121000, 12121001, 12121010, 12121011, 12121012, 12121100, 12121101, 12121110, 12121111, 12121112, 12121121, 12121122, 12121123, 12121210, 12121211, 12121212, 12121221, 12121222, 12121223, 12121232, 12121233, 12121234, 12122100, 12122101, 12122110, 12122111, 12122112, 12122121, 12122122, 12122123, 12122210, 12122211, 12122212, 12122221, 12122222, 12122223, 12122232, 12122233, 12122234, 12122321, 12122322, 12122323, 12122332, 12122333, 12122334, 12122343, 12122344, 12122345, 12123210, 12123211, 12123212, 12123221, 12123222, 12123223, 12123232, 12123233, 12123234, 12123321, 12123322, 12123323, 12123332, 12123333, 12123334, 12123343, 12123344, 12123345, 12123432, 12123433, 12123434, 12123443, 12123444, 12123445, 12123454, 12123455, 12123456, 12210000, 12210001, 12210010, 12210011, 12210012, 12210100, 12210101, 12210110, 12210111, 12210112, 12210121, 12210122, 12210123, 12211000, 12211001, 12211010, 12211011, 12211012, 12211100, 12211101, 12211110, 12211111, 12211112, 12211121, 12211122, 12211123, 12211210, 12211211, 12211212, 12211221, 12211222, 12211223, 12211232, 12211233, 12211234, 12212100, 12212101, 12212110, 12212111, 12212112, 12212121, 12212122, 12212123, 12212210, 12212211, 12212212, 12212221, 12212222, 12212223, 12212232, 12212233, 12212234, 12212321, 12212322, 12212323, 12212332, 12212333, 12212334, 12212343, 12212344, 12212345, 12221000, 12221001, 12221010, 12221011, 12221012, 12221100, 12221101, 12221110, 12221111, 12221112, 12221121, 12221122, 12221123, 12221210, 12221211, 12221212, 12221221, 12221222, 12221223, 12221232, 12221233, 12221234, 12222100, 12222101, 12222110, 12222111, 12222112, 12222121, 12222122, 12222123, 12222210, 12222211, 12222212, 12222221, 12222222, 12222223, 12222232, 12222233, 12222234, 12222321, 12222322, 12222323, 12222332, 12222333, 12222334, 12222343, 12222344, 12222345, 12223210, 12223211, 12223212, 12223221, 12223222, 12223223, 12223232, 12223233, 12223234, 12223321, 12223322, 12223323, 12223332, 12223333, 12223334, 12223343, 12223344, 12223345, 12223432, 12223433, 12223434, 12223443, 12223444, 12223445, 12223454, 12223455, 12223456, 12232100, 12232101, 12232110, 12232111, 12232112, 12232121, 12232122, 12232123, 12232210, 12232211, 12232212, 12232221, 12232222, 12232223, 12232232, 12232233, 12232234, 12232321, 12232322, 12232323, 12232332, 12232333, 12232334, 12232343, 12232344, 12232345, 12233210, 12233211, 12233212, 12233221, 12233222, 12233223, 12233232, 12233233, 12233234, 12233321, 12233322, 12233323, 12233332, 12233333, 12233334, 12233343, 12233344, 12233345, 12233432, 12233433, 12233434, 12233443, 12233444, 12233445, 12233454, 12233455, 12233456, 12234321, 12234322, 12234323, 12234332, 12234333, 12234334, 12234343, 12234344, 12234345, 12234432, 12234433, 12234434, 12234443, 12234444, 12234445, 12234454, 12234455, 12234456, 12234543, 12234544, 12234545, 12234554, 12234555, 12234556, 12234565, 12234566, 12234567, 12321000, 12321001, 12321010, 12321011, 12321012, 12321100, 12321101, 12321110, 12321111, 12321112, 12321121, 12321122, 12321123, 12321210, 12321211, 12321212, 12321221, 12321222, 12321223, 12321232, 12321233, 12321234, 12322100, 12322101, 12322110, 12322111, 12322112, 12322121, 12322122, 12322123, 12322210, 12322211, 12322212, 12322221, 12322222, 12322223, 12322232, 12322233, 12322234, 12322321, 12322322, 12322323, 12322332, 12322333, 12322334, 12322343, 12322344, 12322345, 12323210, 12323211, 12323212, 12323221, 12323222, 12323223, 12323232, 12323233, 12323234, 12323321, 12323322, 12323323, 12323332, 12323333, 12323334, 12323343, 12323344, 12323345, 12323432, 12323433, 12323434, 12323443, 12323444, 12323445, 12323454, 12323455, 12323456, 12332100, 12332101, 12332110, 12332111, 12332112, 12332121, 12332122, 12332123, 12332210, 12332211, 12332212, 12332221, 12332222, 12332223, 12332232, 12332233, 12332234, 12332321, 12332322, 12332323, 12332332, 12332333, 12332334, 12332343, 12332344, 12332345, 12333210, 12333211, 12333212, 12333221, 12333222, 12333223, 12333232, 12333233, 12333234, 12333321, 12333322, 12333323, 12333332, 12333333, 12333334, 12333343, 12333344, 12333345, 12333432, 12333433, 12333434, 12333443, 12333444, 12333445, 12333454, 12333455, 12333456, 12334321, 12334322, 12334323, 12334332, 12334333, 12334334, 12334343, 12334344, 12334345, 12334432, 12334433, 12334434, 12334443, 12334444, 12334445, 12334454, 12334455, 12334456, 12334543, 12334544, 12334545, 12334554, 12334555, 12334556, 12334565, 12334566, 12334567, 12343210, 12343211, 12343212, 12343221, 12343222, 12343223, 12343232, 12343233, 12343234, 12343321, 12343322, 12343323, 12343332, 12343333, 12343334, 12343343, 12343344, 12343345, 12343432, 12343433, 12343434, 12343443, 12343444, 12343445, 12343454, 12343455, 12343456, 12344321, 12344322, 12344323, 12344332, 12344333, 12344334, 12344343, 12344344, 12344345, 12344432, 12344433, 12344434, 12344443, 12344444, 12344445, 12344454, 12344455, 12344456, 12344543, 12344544, 12344545, 12344554, 12344555, 12344556, 12344565, 12344566, 12344567, 12345432, 12345433, 12345434, 12345443, 12345444, 12345445, 12345454, 12345455, 12345456, 12345543, 12345544, 12345545, 12345554, 12345555, 12345556, 12345565, 12345566, 12345567, 12345654, 12345655, 12345656, 12345665, 12345666, 12345667, 12345676, 12345677, 12345678, 21000000, 21000001, 21000010, 21000011, 21000012, 21000100, 21000101, 21000110, 21000111, 21000112, 21000121, 21000122, 21000123, 21001000, 21001001, 21001010, 21001011, 21001012, 21001100, 21001101, 21001110, 21001111, 21001112, 21001121, 21001122, 21001123, 21001210, 21001211, 21001212, 21001221, 21001222, 21001223, 21001232, 21001233, 21001234, 21010000, 21010001, 21010010, 21010011, 21010012, 21010100, 21010101, 21010110, 21010111, 21010112, 21010121, 21010122, 21010123, 21011000, 21011001, 21011010, 21011011, 21011012, 21011100, 21011101, 21011110, 21011111, 21011112, 21011121, 21011122, 21011123, 21011210, 21011211, 21011212, 21011221, 21011222, 21011223, 21011232, 21011233, 21011234, 21012100, 21012101, 21012110, 21012111, 21012112, 21012121, 21012122, 21012123, 21012210, 21012211, 21012212, 21012221, 21012222, 21012223, 21012232, 21012233, 21012234, 21012321, 21012322, 21012323, 21012332, 21012333, 21012334, 21012343, 21012344, 21012345, 21100000, 21100001, 21100010, 21100011, 21100012, 21100100, 21100101, 21100110, 21100111, 21100112, 21100121, 21100122, 21100123, 21101000, 21101001, 21101010, 21101011, 21101012, 21101100, 21101101, 21101110, 21101111, 21101112, 21101121, 21101122, 21101123, 21101210, 21101211, 21101212, 21101221, 21101222, 21101223, 21101232, 21101233, 21101234, 21110000, 21110001, 21110010, 21110011, 21110012, 21110100, 21110101, 21110110, 21110111, 21110112, 21110121, 21110122, 21110123, 21111000, 21111001, 21111010, 21111011, 21111012, 21111100, 21111101, 21111110, 21111111, 21111112, 21111121, 21111122, 21111123, 21111210, 21111211, 21111212, 21111221, 21111222, 21111223, 21111232, 21111233, 21111234, 21112100, 21112101, 21112110, 21112111, 21112112, 21112121, 21112122, 21112123, 21112210, 21112211, 21112212, 21112221, 21112222, 21112223, 21112232, 21112233, 21112234, 21112321, 21112322, 21112323, 21112332, 21112333, 21112334, 21112343, 21112344, 21112345, 21121000, 21121001, 21121010, 21121011, 21121012, 21121100, 21121101, 21121110, 21121111, 21121112, 21121121, 21121122, 21121123, 21121210, 21121211, 21121212, 21121221, 21121222, 21121223, 21121232, 21121233, 21121234, 21122100, 21122101, 21122110, 21122111, 21122112, 21122121, 21122122, 21122123, 21122210, 21122211, 21122212, 21122221, 21122222, 21122223, 21122232, 21122233, 21122234, 21122321, 21122322, 21122323, 21122332, 21122333, 21122334, 21122343, 21122344, 21122345, 21123210, 21123211, 21123212, 21123221, 21123222, 21123223, 21123232, 21123233, 21123234, 21123321, 21123322, 21123323, 21123332, 21123333, 21123334, 21123343, 21123344, 21123345, 21123432, 21123433, 21123434, 21123443, 21123444, 21123445, 21123454, 21123455, 21123456, 21210000, 21210001, 21210010, 21210011, 21210012, 21210100, 21210101, 21210110, 21210111, 21210112, 21210121, 21210122, 21210123, 21211000, 21211001, 21211010, 21211011, 21211012, 21211100, 21211101, 21211110, 21211111, 21211112, 21211121, 21211122, 21211123, 21211210, 21211211, 21211212, 21211221, 21211222, 21211223, 21211232, 21211233, 21211234, 21212100, 21212101, 21212110, 21212111, 21212112, 21212121, 21212122, 21212123, 21212210, 21212211, 21212212, 21212221, 21212222, 21212223, 21212232, 21212233, 21212234, 21212321, 21212322, 21212323, 21212332, 21212333, 21212334, 21212343, 21212344, 21212345, 21221000, 21221001, 21221010, 21221011, 21221012, 21221100, 21221101, 21221110, 21221111, 21221112, 21221121, 21221122, 21221123, 21221210, 21221211, 21221212, 21221221, 21221222, 21221223, 21221232, 21221233, 21221234, 21222100, 21222101, 21222110, 21222111, 21222112, 21222121, 21222122, 21222123, 21222210, 21222211, 21222212, 21222221, 21222222, 21222223, 21222232, 21222233, 21222234, 21222321, 21222322, 21222323, 21222332, 21222333, 21222334, 21222343, 21222344, 21222345, 21223210, 21223211, 21223212, 21223221, 21223222, 21223223, 21223232, 21223233, 21223234, 21223321, 21223322, 21223323, 21223332, 21223333, 21223334, 21223343, 21223344, 21223345, 21223432, 21223433, 21223434, 21223443, 21223444, 21223445, 21223454, 21223455, 21223456, 21232100, 21232101, 21232110, 21232111, 21232112, 21232121, 21232122, 21232123, 21232210, 21232211, 21232212, 21232221, 21232222, 21232223, 21232232, 21232233, 21232234, 21232321, 21232322, 21232323, 21232332, 21232333, 21232334, 21232343, 21232344, 21232345, 21233210, 21233211, 21233212, 21233221, 21233222, 21233223, 21233232, 21233233, 21233234, 21233321, 21233322, 21233323, 21233332, 21233333, 21233334, 21233343, 21233344, 21233345, 21233432, 21233433, 21233434, 21233443, 21233444, 21233445, 21233454, 21233455, 21233456, 21234321, 21234322, 21234323, 21234332, 21234333, 21234334, 21234343, 21234344, 21234345, 21234432, 21234433, 21234434, 21234443, 21234444, 21234445, 21234454, 21234455, 21234456, 21234543, 21234544, 21234545, 21234554, 21234555, 21234556, 21234565, 21234566, 21234567, 22100000, 22100001, 22100010, 22100011, 22100012, 22100100, 22100101, 22100110, 22100111, 22100112, 22100121, 22100122, 22100123, 22101000, 22101001, 22101010, 22101011, 22101012, 22101100, 22101101, 22101110, 22101111, 22101112, 22101121, 22101122, 22101123, 22101210, 22101211, 22101212, 22101221, 22101222, 22101223, 22101232, 22101233, 22101234, 22110000, 22110001, 22110010, 22110011, 22110012, 22110100, 22110101, 22110110, 22110111, 22110112, 22110121, 22110122, 22110123, 22111000, 22111001, 22111010, 22111011, 22111012, 22111100]
print(a[K-1])