You are given a string $$$s$$$ consisting of lowercase Latin letters. Let the length of $$$s$$$ be $$$|s|$$$. You may perform several operations on this string.In one operation, you can choose some index $$$i$$$ and remove the $$$i$$$-th character of $$$s$$$ ($$$s_i$$$) if at least one of its adjacent characters is the previous letter in the Latin alphabet for $$$s_i$$$. For example, the previous letter for b is a, the previous letter for s is r, the letter a has no previous letters. Note that after each removal the length of the string decreases by one. So, the index $$$i$$$ should satisfy the condition $$$1 \le i \le |s|$$$ during each operation.For the character $$$s_i$$$ adjacent characters are $$$s_{i-1}$$$ and $$$s_{i+1}$$$. The first and the last characters of $$$s$$$ both have only one adjacent character (unless $$$|s| = 1$$$).Consider the following example. Let $$$s=$$$ bacabcab.  During the first move, you can remove the first character $$$s_1=$$$ b because $$$s_2=$$$ a. Then the string becomes $$$s=$$$ acabcab.  During the second move, you can remove the fifth character $$$s_5=$$$ c because $$$s_4=$$$ b. Then the string becomes $$$s=$$$ acabab.  During the third move, you can remove the sixth character $$$s_6=$$$'b' because $$$s_5=$$$ a. Then the string becomes $$$s=$$$ acaba.  During the fourth move, the only character you can remove is $$$s_4=$$$ b, because $$$s_3=$$$ a (or $$$s_5=$$$ a). The string becomes $$$s=$$$ acaa and you cannot do anything with it. Your task is to find the maximum possible number of characters you can remove if you choose the sequence of operations optimally.

Print one integer — the maximum possible number of characters you can remove if you choose the sequence of moves optimally.

NoteThe first example is described in the problem statement. Note that the sequence of moves provided in the statement is not the only, but it can be shown that the maximum possible answer to this test is $$$4$$$.In the second example, you can remove all but one character of $$$s$$$. The only possible answer follows.  During the first move, remove the third character $$$s_3=$$$ d, $$$s$$$ becomes bca.  During the second move, remove the second character $$$s_2=$$$ c, $$$s$$$ becomes ba.  And during the third move, remove the first character $$$s_1=$$$ b, $$$s$$$ becomes a.

The only line of the input contains one integer $$$|s|$$$ ($$$1 \le |s| \le 100$$$) — the length of $$$s$$$. The second line of the input contains one string $$$s$$$ consisting of $$$|s|$$$ lowercase Latin letters.

Input:
8
bacabcab

Output: 4

Input:
4
bcda

Output: 3

Input:
6
abbbbb

Output: 5

Input:
1
a

Output: 0

Input:
1
t

Output: 0

Input:
100
ciftajmzqbfkvbhnyugneialytrkwjlhzwltylptheadmypbjxdzkxnqovimgmzkwpuelzbbhciinfiyspfatgoexeezolulnliu

Output: 0

Input:
100
yzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz

Output: 99

Input:
100
aaaaaabbcccccccddffffhhhhhhhhiiiiiikkkkkkkkmmmmmmooooooopppprrrrrrrrrttttttvvvvvvvvvvvvxxxxxxxzzzzzz

Output: 21

Input:
100
babaababbaabbabababbabbbababababbaabababaaababaababbbaaababbaabbababababbababbabaabbaabaaaaabbababba

Output: 50

Input:
100
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb

Output: 99

Input:
100
acdfijmnorszzyyzzzzzzyzzyzzzzxwzzzzzyzzzzzzyzzzzzzzyzzzzzyzzzzzzyxzzzyzzzzzyzzzzzyzzyzzzzvutqplkhgeb

Output: 99

Input:
100
abcdeghfgefedeefcabaaabcedfefedacbbcaaabehhjlkjikjloqrtuyzxwvspnmnlkjgfdcbacdcghfedfebaacbcbcdbccaaa

Output: 85

Input:
100
ababaaaabaabaaaaaaabaaaaaaaaaaaaacbaaaabaaaaaabaabaaaababaaaabaehijkmnpqvxzywutsrolgfdcbaaaabaabaaaa

Output: 40

Input:
100
aaaaaaabaaaaaabcaaaaaaaaaaaaaaaaaaaabbbaaaaaaabefhklmnopsuxzywvtrqjigdcaaaaaaaaaaaaaaaaaaaaaaaabaaaa

Output: 32

Input:
100
aaaaabcjkprsvxyzwutqonmlihgfedaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Output: 26

Input:
100
yltrygcqmgjzsxoahbvovspancmoaltdrxgjnxwxbrehubvradguoqgiodzanljxtszdutuzgcnihmwevoloceyidyvoopnqbtlb

Output: 9

Input:
100
aaaabbbcccccccdddddeeeeeffgggghhhiijjjjkkkllmmnnnoooppqqqrrrrssssssttttuuuuuuuuvvvvvwwwwxxxxyyyyzzzz

Output: 96

Input:
100
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Output: 0

Input:
100
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn

Output: 0

Input:
100
jupemetthxolktvhbmzdwlrekwmcugngajdgifwseksjlibsdgmegmqtmeeeqszqjxjhjenjxofvkesfjugbzephryjqqkxatrvl

Output: 1

Input:
100
mxjrojjwtrauhhccftvjsyfyfsnbdnwjfltyjetsylbddrkoqjxbmientcowknrecfqcvxfgsbymwyvakmbulhvrxzvzbygajtgc

Output: 2

Input:
100
bldubjepvkwhjbxrueydtpparjszjgwpxjlqlpsmdrjoaagfnrohfcabchmdwaoctmilfbpztwjrfdgdioqggokdftcniqywmvjd

Output: 3

Input:
100
zbzevxgewibujtbyvhzohoobudkghaivlbpaywiesizahkdxmcpdoqzsxqglezenmsgvsmxcrzcntauvarpakddglhrjmzylfuyq

Output: 4

Input:
100
whkbjjjrpcgsfaxgcmktmwypyfhbzvvowkvxltbmnyndqkswixxqxriopddrygymbcvadjjheugxgikrlirnhhsmnjmzpizyltau

Output: 5

Input:
1
z

Output: 0

Input:
5
babaa

Output: 2

Input:
5
abbdd

Output: 2

Input:
6
aaaaaa

Output: 0

Input:
6
bbbbab

Output: 5

Input:
6
baabbb

Output: 4

Input:
6
dacbab

Output: 3

Input:
7
aaaaaaa

Output: 0

Input:
7
baaabab

Output: 3

Input:
7
ccababa

Output: 2

Input:
7
cddcbcb

Output: 5

Input:
8
aaaaaaaa

Output: 0

Input:
8
aaabbaab

Output: 3

Input:
8
abababbc

Output: 5

Input:
8
bdaacddc

Output: 2

Input:
9
aaaaaaaaa

Output: 0

Input:
9
aabaaabab

Output: 3

Input:
9
baccbbaca

Output: 5

Input:
9
acacaabaa

Output: 1

Input:
10
aaaaaaaaaa

Output: 0

Input:
10
bbaabaabbb

Output: 6

Input:
10
cbbbbcaaca

Output: 6

Input:
10
cadbcdddda

Output: 6


You can not just take the file and send it. When Polycarp trying to send a file in the social network "Codehorses", he encountered an unexpected problem. If the name of the file contains three or more "x" (lowercase Latin letters "x") in a row, the system considers that the file content does not correspond to the social network topic. In this case, the file is not sent and an error message is displayed.Determine the minimum number of characters to remove from the file name so after that the name does not contain "xxx" as a substring. Print 0 if the file name does not initially contain a forbidden substring "xxx".You can delete characters in arbitrary positions (not necessarily consecutive). If you delete a character, then the length of a string is reduced by $$$1$$$. For example, if you delete the character in the position $$$2$$$ from the string "exxxii", then the resulting string is "exxii".

Print the minimum number of characters to remove from the file name so after that the name does not contain "xxx" as a substring. If initially the file name dost not contain a forbidden substring "xxx", print 0.

NoteIn the first example Polycarp tried to send a file with name contains number $$$33$$$, written in Roman numerals. But he can not just send the file, because it name contains three letters "x" in a row. To send the file he needs to remove any one of this letters.

The first line contains integer $$$n$$$ $$$(3 \le n \le 100)$$$ — the length of the file name. The second line contains a string of length $$$n$$$ consisting of lowercase Latin letters only — the file name.

Input:
6
xxxiii

Output: 1

Output: 1

Output: 1

Input:
5
xxoxx

Output: 0

Output: 0

Output: 0

Input:
10
xxxxxxxxxx

Output: 8

Output: 8

Output: 8

Input:
100
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Output: 98

Output: 98

Output: 98

Input:
99
xxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxa

Output: 0

Output: 0

Output: 0

Input:
3
xxx

Output: 1

Output: 1

Output: 1

Input:
77
aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxyyyzzz

Output: 0

Output: 0

Output: 0

Input:
100
uxxxxxlmexxxxxxxwnxxexxxxxcxxfydxxxxxxvmdxxxxxxisxxxxxxxxidkxxxpxxxxxxxxmnuxxxxjxxxqcxxwmxxxxxxxxmrx

Output: 41

Output: 41

Output: 41

Input:
100
xxxxxxxxxxxjtxxxxxxxxcxxxxxxcfxxxxzxxxxxxgxxxxxbxxxxbxxxxxxxxdycxxxxokixxxkizxxgcxxxxxxxxexxxxxfxxxc

Output: 49

Output: 49

Output: 49

Input:
100
uxxxxxlmexxxxxxxwnxxexxxxxcxxfydxxxxxxvmdxxxxxxisxxxxxxxxidkxxxpxxxxxxxxmnuxxxxjxxxqcxxwmxxxxxwxxxxx

Output: 41

Output: 41

Output: 41

Input:
34
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Output: 0

Output: 0

Output: 0

Input:
5
fcyju

Output: 0

Output: 0

Output: 0

Input:
100
ihygyvdvyeifomhxhkhdkimquvgallbqharcyriyqkidnwykozuhvkwdldlztpabgyuflikychqpdenwzgtlzotyumjgdsrbxxxx

Output: 2

Output: 2

Output: 2


Pak Chanek plans to build a garage. He wants the garage to consist of a square and a right triangle that are arranged like the following illustration.  Define $$$a$$$ and $$$b$$$ as the lengths of two of the sides in the right triangle as shown in the illustration. An integer $$$x$$$ is suitable if and only if we can construct a garage with assigning positive integer values for the lengths $$$a$$$ and $$$b$$$ ($$$a<b$$$) so that the area of the square at the bottom is exactly $$$x$$$. As a good friend of Pak Chanek, you are asked to help him find the $$$N$$$-th smallest suitable number.

An integer that represents the $$$N$$$-th smallest suitable number.

NoteThe $$$3$$$-rd smallest suitable number is $$$7$$$. A square area of $$$7$$$ can be obtained by assigning $$$a=3$$$ and $$$b=4$$$.

The only line contains a single integer $$$N$$$ ($$$1 \leq N \leq 10^9$$$).


A chainword is a special type of crossword. As most of the crosswords do, it has cells that you put the letters in and some sort of hints to what these letters should be.The letter cells in a chainword are put in a single row. We will consider chainwords of length $$$m$$$ in this task.A hint to a chainword is a sequence of segments such that the segments don't intersect with each other and cover all $$$m$$$ letter cells. Each segment contains a description of the word in the corresponding cells.The twist is that there are actually two hints: one sequence is the row above the letter cells and the other sequence is the row below the letter cells. When the sequences are different, they provide a way to resolve the ambiguity in the answers.You are provided with a dictionary of $$$n$$$ words, each word consists of lowercase Latin letters. All words are pairwise distinct.An instance of a chainword is the following triple:   a string of $$$m$$$ lowercase Latin letters;  the first hint: a sequence of segments such that the letters that correspond to each segment spell a word from the dictionary;  the second hint: another sequence of segments such that the letters that correspond to each segment spell a word from the dictionary. Note that the sequences of segments don't necessarily have to be distinct.Two instances of chainwords are considered different if they have different strings, different first hints or different second hints.Count the number of different instances of chainwords. Since the number might be pretty large, output it modulo $$$998\,244\,353$$$.

Print a single integer — the number of different instances of chainwords of length $$$m$$$ for the given dictionary modulo $$$998\,244\,353$$$.

NoteHere are all the instances of the valid chainwords for the first example:   The red lines above the letters denote the segments of the first hint, the blue lines below the letters denote the segments of the second hint.In the second example the possible strings are: "abab", "abcd", "cdab" and "cdcd". All the hints are segments that cover the first two letters and the last two letters.

The first line contains two integers $$$n$$$ and $$$m$$$ ($$$1 \le n \le 8$$$, $$$1 \le m \le 10^9$$$) — the number of words in the dictionary and the number of letter cells. Each of the next $$$n$$$ lines contains a word — a non-empty string of no more than $$$5$$$ lowercase Latin letters. All words are pairwise distinct.

Input:
3 5
ababa
ab
a

Output: 11

Output: 11

Input:
2 4
ab
cd

Output: 4

Output: 4

Input:
5 100
a
aa
aaa
aaaa
aaaaa

Output: 142528942

Output: 142528942

Input:
8 3
ba
bbb
bb
aba
aab
baa
b
a

Output: 56

Output: 56

Input:
8 5
abb
baa
a
aba
aa
b
ba
bb

Output: 1824

Output: 1824

Input:
8 10
aa
ba
a
aaa
bb
aab
aba
b

Output: 7610511

Output: 7610511

Input:
8 10
bac
aa
bbac
bcc
bbca
aac
abba
bbba

Output: 227

Output: 227

Input:
8 100
aabab
aaa
aba
bbaba
a
aa
babba
bba

Output: 452563662

Output: 452563662

Input:
8 100
cbb
baaba
cc
acb
abbba
bb
bcc
cbccc

Output: 85330586

Output: 85330586

Input:
8 10000
bb
bbb
baa
bbaaa
bbabb
baabb
ab
b

Output: 921272334

Output: 921272334

Input:
8 10000
cc
bcbac
c
bbbca
bab
bcb
aab
acbc

Output: 62834015

Output: 62834015

Input:
8 1000000
ba
baab
ab
babaa
a
b
aaa
abb

Output: 109599579

Output: 109599579

Input:
8 1000000
abbca
abcbc
bc
cb
bcbc
c
b
abc

Output: 431249243

Output: 431249243

Input:
8 1000000
a
ccdc
dac
b
bdad
c
adbdd
badbd

Output: 467270984

Output: 467270984

Input:
8 1000000
ks
mbha
byn
cz
g
mv
nct
bty

Output: 206210322

Output: 206210322

Input:
8 1000000000
bbba
b
aab
aabb
aba
baabb
ab
a

Output: 108439359

Output: 108439359

Input:
8 1000000000
a
acbca
abcab
aabcb
b
cbb
ba
baaca

Output: 678704568

Output: 678704568

Input:
8 1000000000
dcaab
dacdd
ddbdd
bcca
dcacd
b
ccbba
abdd

Output: 458353495

Output: 458353495

Input:
8 1000000000
um
mruk
if
snyg
jts
p
r
iwq

Output: 108201875

Output: 108201875

Input:
8 100
ag
csryq
x
kj
fsw
i
rxel
vix

Output: 512164740

Output: 512164740

Input:
8 10000
degs
j
hlzua
iug
oaow
zvyuf
wkxv
knwln

Output: 612606463

Output: 612606463

Input:
8 1000000
o
nct
au
cz
bty
g
mv
ks

Output: 944380708

Output: 944380708

Input:
2 1000000000
b
ab

Output: 857532742

Output: 857532742

Input:
3 1000000000
cbb
a
b

Output: 801305101

Output: 801305101

Input:
4 1000000000
dcaab
abdd
ccbba
bcca

Output: 946198550

Output: 946198550

Input:
8 1000000000
p
r
yywvs
um
mruk
snyg
jts
if

Output: 91058640

Output: 91058640

Input:
8 1000000000
aaaaa
aaaa
bbbbb
bbbb
ccccc
cccc
ddddd
dddd

Output: 906861955

Output: 906861955

Input:
8 1000000000
bb
aaba
aabab
ab
bbbb
bba
bab
aabba

Output: 863094010

Output: 863094010

Input:
8 1000000000
b
babab
baba
ab
bb
aabaa
bbbab
aa

Output: 862350285

Output: 862350285

Input:
8 1000000000
baab
bbbba
b
abab
a
babab
abbb
aabb

Output: 174056525

Output: 174056525

Input:
8 1000000000
bbaba
bab
baabb
abbba
a
b
bbbab
aaab

Output: 134173168

Output: 134173168

Input:
8 1000000000
aaaa
babbb
bbaab
abbbb
abb
a
baaab
babab

Output: 431759116

Output: 431759116

Input:
8 1000000000
baaaa
bba
aaabb
abbaa
ababb
aab
aaaba
aabaa

Output: 749577944

Output: 749577944

Input:
8 1000000000
babba
b
bb
bbaaa
aaaba
abaab
aabaa
baaba

Output: 3182713

Output: 3182713

Input:
8 1000000000
baabb
babbb
b
aabbb
bbbba
bbaa
abbbb
abab

Output: 834686688

Output: 834686688

Input:
8 671088639
aaaaa
aaaa
bbbbb
bbbb
ccccc
cccc
ddddd
dddd

Output: 840688293

Output: 840688293

Input:
8 671088639
aaaaa
aaaa
bbbbb
bbbb
aaabb
bbbaa
aabbb
bbaaa

Output: 376573480

Output: 376573480

Input:
8 671088639
aaaaa
aaaa
bbbbb
bbbb
aaaab
bbbba
aaabb
bbbaa

Output: 775296008

Output: 775296008

Input:
8 805306367
aaaaa
aaaab
aaabb
aabbb
abbbb
bbbbb
aaaa
bbbb

Output: 233390545

Output: 233390545

Input:
8 805306367
bbbb
abbaa
ababa
aabba
bbaab
babab
baabb
bbbbb

Output: 40171194

Output: 40171194

Input:
8 805306367
aaaaa
bbbbb
ccccc
ddddd
eeeee
fffff
ggggg
hhhhh

Output: 0

Output: 0

Input:
8 805306367
aeifj
caeif
eifjg
fjgc
fjgca
gcaei
ifjgc
jgcae

Output: 223759404

Output: 223759404

Input:
8 805306367
bidek
dekhj
ekhjb
hjbid
idekh
jbide
khjbi
bide

Output: 223759404

Output: 223759404

Input:
8 805306365
cefdj
djhic
efdjh
fdjhi
hicef
icefd
jhice
djhi

Output: 275348811

Output: 275348811

Input:
3 5
ababa
ab
a

Output: 11

Output: 11

Output: 11

Input:
2 4
ab
cd

Output: 4

Output: 4

Output: 4

Input:
5 100
a
aa
aaa
aaaa
aaaaa

Output: 142528942

Output: 142528942

Output: 142528942

Input:
8 3
ba
bbb
bb
aba
aab
baa
b
a

Output: 56

Output: 56

Output: 56

Input:
8 5
abb
baa
a
aba
aa
b
ba
bb

Output: 1824

Output: 1824

Output: 1824

Input:
8 10
aa
ba
a
aaa
bb
aab
aba
b

Output: 7610511

Output: 7610511

Output: 7610511

Input:
8 10
bac
aa
bbac
bcc
bbca
aac
abba
bbba

Output: 227

Output: 227

Output: 227

Input:
8 100
aabab
aaa
aba
bbaba
a
aa
babba
bba

Output: 452563662

Output: 452563662

Output: 452563662

Input:
8 100
cbb
baaba
cc
acb
abbba
bb
bcc
cbccc

Output: 85330586

Output: 85330586

Output: 85330586

Input:
8 10000
bb
bbb
baa
bbaaa
bbabb
baabb
ab
b

Output: 921272334

Output: 921272334

Output: 921272334

Input:
8 10000
cc
bcbac
c
bbbca
bab
bcb
aab
acbc

Output: 62834015

Output: 62834015

Output: 62834015

Input:
8 1000000
ba
baab
ab
babaa
a
b
aaa
abb

Output: 109599579

Output: 109599579

Output: 109599579

Input:
8 1000000
abbca
abcbc
bc
cb
bcbc
c
b
abc

Output: 431249243

Output: 431249243

Output: 431249243

Input:
8 1000000
a
ccdc
dac
b
bdad
c
adbdd
badbd

Output: 467270984

Output: 467270984

Output: 467270984

Input:
8 1000000
ks
mbha
byn
cz
g
mv
nct
bty

Output: 206210322

Output: 206210322

Output: 206210322

Input:
8 1000000000
bbba
b
aab
aabb
aba
baabb
ab
a

Output: 108439359

Output: 108439359

Output: 108439359

Input:
8 1000000000
a
acbca
abcab
aabcb
b
cbb
ba
baaca

Output: 678704568

Output: 678704568

Output: 678704568

Input:
8 1000000000
dcaab
dacdd
ddbdd
bcca
dcacd
b
ccbba
abdd

Output: 458353495

Output: 458353495

Output: 458353495

Input:
8 1000000000
um
mruk
if
snyg
jts
p
r
iwq

Output: 108201875

Output: 108201875

Output: 108201875

Input:
8 100
ag
csryq
x
kj
fsw
i
rxel
vix

Output: 512164740

Output: 512164740

Output: 512164740

Input:
8 10000
degs
j
hlzua
iug
oaow
zvyuf
wkxv
knwln

Output: 612606463

Output: 612606463

Output: 612606463

Input:
8 1000000
o
nct
au
cz
bty
g
mv
ks

Output: 944380708

Output: 944380708

Output: 944380708

Input:
2 1000000000
b
ab

Output: 857532742

Output: 857532742

Output: 857532742

Input:
3 1000000000
cbb
a
b

Output: 801305101

Output: 801305101

Output: 801305101

Input:
4 1000000000
dcaab
abdd
ccbba
bcca

Output: 946198550

Output: 946198550

Output: 946198550

Input:
8 1000000000
p
r
yywvs
um
mruk
snyg
jts
if

Output: 91058640

Output: 91058640

Output: 91058640

Input:
8 1000000000
aaaaa
aaaa
bbbbb
bbbb
ccccc
cccc
ddddd
dddd

Output: 906861955

Output: 906861955

Output: 906861955

Input:
8 1000000000
bb
aaba
aabab
ab
bbbb
bba
bab
aabba

Output: 863094010

Output: 863094010

Output: 863094010

Input:
8 1000000000
b
babab
baba
ab
bb
aabaa
bbbab
aa

Output: 862350285

Output: 862350285

Output: 862350285

Input:
8 1000000000
baab
bbbba
b
abab
a
babab
abbb
aabb

Output: 174056525

Output: 174056525

Output: 174056525

Input:
8 1000000000
bbaba
bab
baabb
abbba
a
b
bbbab
aaab

Output: 134173168

Output: 134173168

Output: 134173168

Input:
8 1000000000
aaaa
babbb
bbaab
abbbb
abb
a
baaab
babab

Output: 431759116

Output: 431759116

Output: 431759116

Input:
8 1000000000
baaaa
bba
aaabb
abbaa
ababb
aab
aaaba
aabaa

Output: 749577944

Output: 749577944

Output: 749577944

Input:
8 1000000000
babba
b
bb
bbaaa
aaaba
abaab
aabaa
baaba

Output: 3182713

Output: 3182713

Output: 3182713

Input:
8 1000000000
baabb
babbb
b
aabbb
bbbba
bbaa
abbbb
abab

Output: 834686688

Output: 834686688

Output: 834686688

Input:
8 671088639
aaaaa
aaaa
bbbbb
bbbb
ccccc
cccc
ddddd
dddd

Output: 840688293

Output: 840688293

Output: 840688293

Input:
8 671088639
aaaaa
aaaa
bbbbb
bbbb
aaabb
bbbaa
aabbb
bbaaa

Output: 376573480

Output: 376573480

Output: 376573480

Input:
8 671088639
aaaaa
aaaa
bbbbb
bbbb
aaaab
bbbba
aaabb
bbbaa

Output: 775296008

Output: 775296008

Output: 775296008

Input:
8 805306367
aaaaa
aaaab
aaabb
aabbb
abbbb
bbbbb
aaaa
bbbb

Output: 233390545

Output: 233390545

Output: 233390545

Input:
8 805306367
bbbb
abbaa
ababa
aabba
bbaab
babab
baabb
bbbbb

Output: 40171194

Output: 40171194

Output: 40171194

Input:
8 805306367
aaaaa
bbbbb
ccccc
ddddd
eeeee
fffff
ggggg
hhhhh

Output: 0

Output: 0

Output: 0

Input:
8 805306367
aeifj
caeif
eifjg
fjgc
fjgca
gcaei
ifjgc
jgcae

Output: 223759404

Output: 223759404

Output: 223759404

Input:
8 805306367
bidek
dekhj
ekhjb
hjbid
idekh
jbide
khjbi
bide

Output: 223759404

Output: 223759404

Output: 223759404

Input:
8 805306365
cefdj
djhic
efdjh
fdjhi
hicef
icefd
jhice
djhi

Output: 275348811

Output: 275348811

Output: 275348811


Little Johnny Bubbles enjoys spending hours in front of his computer playing video games. His favorite game is Bubble Strike, fast-paced bubble shooting online game for two players.Each game is set in one of the N maps, each having different terrain configuration. First phase of each game decides on which map the game will be played. The game system randomly selects three maps and shows them to the players. Each player must pick one of those three maps to be discarded. The game system then randomly selects one of the maps that were not picked by any of the players and starts the game.Johnny is deeply enthusiastic about the game and wants to spend some time studying maps, thus increasing chances to win games played on those maps. However, he also needs to do his homework, so he does not have time to study all the maps. That is why he asked himself the following question: "What is the minimum number of maps I have to study, so that the probability to play one of those maps is at least $$$P$$$"?Can you help Johnny find the answer for this question? You can assume Johnny's opponents do not know him, and they will randomly pick maps.

Output contains one integer number – minimum number of maps Johnny has to study.

The first line contains two integers $$$N$$$ ($$$3$$$ $$$\leq$$$ $$$N$$$ $$$\leq$$$ $$$10^{3}$$$) and $$$P$$$ ($$$0$$$ $$$\leq$$$ $$$P$$$ $$$\leq$$$ $$$1$$$) – total number of maps in the game and probability to play map Johnny has studied. $$$P$$$ will have at most four digits after the decimal point.

Input: 7 1.0000

Output: 6

Output: 6

Output: 6

Output: 6

Input: 3 0.0000

Output: 0

Output: 0

Output: 0

Output: 0

Input: 3 1.0000

Output: 2

Output: 2

Output: 2

Output: 2

Input: 1000 0.0000

Output: 0

Output: 0

Output: 0

Output: 0

Input: 1000 1.0000

Output: 999

Output: 999

Output: 999

Output: 999

Input: 999 1.0000

Output: 998

Output: 998

Output: 998

Output: 998

Input: 38 0.2356

Output: 6

Output: 6

Output: 6

Output: 6

Input: 217 0.0744

Output: 11

Output: 11

Output: 11

Output: 11

Input: 847 0.3600

Output: 208

Output: 208

Output: 208

Output: 208

Input: 357 0.9853

Output: 321

Output: 321

Output: 321

Output: 321

Input: 440 0.9342

Output: 344

Output: 344

Output: 344

Output: 344

Input: 848 0.8576

Output: 571

Output: 571

Output: 571

Output: 571

Input: 141 0.0086

Output: 1

Output: 1

Output: 1

Output: 1

Input: 517 0.4859

Output: 174

Output: 174

Output: 174

Output: 174

Input: 937 0.8022

Output: 573

Output: 573

Output: 573

Output: 573

Input: 995 0.4480

Output: 307

Output: 307

Output: 307

Output: 307

Input: 956 0.9733

Output: 826

Output: 826

Output: 826

Output: 826

Input: 634 0.7906

Output: 380

Output: 380

Output: 380

Output: 380

Input: 439 0.0404

Output: 12

Output: 12

Output: 12

Output: 12

Input: 853 0.0684

Output: 39

Output: 39

Output: 39

Output: 39

Input: 716 0.9851

Output: 643

Output: 643

Output: 643

Output: 643

Input: 444 0.0180

Output: 6

Output: 6

Output: 6

Output: 6

Input: 840 0.5672

Output: 336

Output: 336

Output: 336

Output: 336

Input: 891 0.6481

Output: 415

Output: 415

Output: 415

Output: 415

Input: 588 0.3851

Output: 155

Output: 155

Output: 155

Output: 155

Input: 444 0.0265

Output: 8

Output: 8

Output: 8

Output: 8

Input: 504 0.2099

Output: 71

Output: 71

Output: 71

Output: 71

Input: 195 0.5459

Output: 75

Output: 75

Output: 75

Output: 75

Input: 566 0.6282

Output: 254

Output: 254

Output: 254

Output: 254

Input: 200 0.9495

Output: 162

Output: 162

Output: 162

Output: 162

Input: 571 0.5208

Output: 208

Output: 208

Output: 208

Output: 208

Input: 622 0.8974

Output: 452

Output: 452

Output: 452

Output: 452

Input: 267 0.4122

Output: 76

Output: 76

Output: 76

Output: 76

Input: 364 0.3555

Output: 88

Output: 88

Output: 88

Output: 88

Input: 317 0.2190

Output: 47

Output: 47

Output: 47

Output: 47

Input: 329 0.5879

Output: 137

Output: 137

Output: 137

Output: 137


You are given an undirected graph consisting of $$$n$$$ vertices and $$$m$$$ edges. Initially there is a single integer written on every vertex: the vertex $$$i$$$ has $$$p_i$$$ written on it. All $$$p_i$$$ are distinct integers from $$$1$$$ to $$$n$$$.You have to process $$$q$$$ queries of two types:  $$$1$$$ $$$v$$$ — among all vertices reachable from the vertex $$$v$$$ using the edges of the graph (including the vertex $$$v$$$ itself), find a vertex $$$u$$$ with the largest number $$$p_u$$$ written on it, print $$$p_u$$$ and replace $$$p_u$$$ with $$$0$$$;  $$$2$$$ $$$i$$$ — delete the $$$i$$$-th edge from the graph.  Note that, in a query of the first type, it is possible that all vertices reachable from $$$v$$$ have $$$0$$$ written on them. In this case, $$$u$$$ is not explicitly defined, but since the selection of $$$u$$$ does not affect anything, you can choose any vertex reachable from $$$v$$$ and print its value (which is $$$0$$$).

For every query of the first type, print the value of $$$p_u$$$ written on the chosen vertex $$$u$$$.

The first line contains three integers $$$n$$$, $$$m$$$ and $$$q$$$ ($$$1 \le n \le 2 \cdot 10^5$$$; $$$1 \le m \le 3 \cdot 10^5$$$; $$$1 \le q \le 5 \cdot 10^5$$$). The second line contains $$$n$$$ distinct integers $$$p_1$$$, $$$p_2$$$, ..., $$$p_n$$$, where $$$p_i$$$ is the number initially written on vertex $$$i$$$ ($$$1 \le p_i \le n$$$). Then $$$m$$$ lines follow, the $$$i$$$-th of them contains two integers $$$a_i$$$ and $$$b_i$$$ ($$$1 \le a_i, b_i \le n$$$, $$$a_i \ne b_i$$$) and means that the $$$i$$$-th edge connects vertices $$$a_i$$$ and $$$b_i$$$. It is guaranteed that the graph does not contain multi-edges. Then $$$q$$$ lines follow, which describe the queries. Each line is given by one of the following formats:   $$$1$$$ $$$v$$$ — denotes a query of the first type with a vertex $$$v$$$ ($$$1 \le v \le n$$$).  $$$2$$$ $$$i$$$ — denotes a query of the second type with an edge $$$i$$$ ($$$1 \le i \le m$$$). For each query of the second type, it is guaranteed that the corresponding edge is not deleted from the graph yet.

Input:
5 4 6
1 2 5 4 3
1 2
2 3
1 3
4 5
1 1
2 1
2 3
1 1
1 2
1 2

Output:
5
1
2
0

Input:
6 5 8
1 2 6 3 4 5
2 4
1 3
1 6
3 5
2 5
1 1
1 4
1 1
2 1
2 5
2 2
2 3
1 4

Output:
6
5
4
3

Input:
9 5 14
7 1 4 8 5 2 6 9 3
2 8
1 6
5 7
1 3
3 9
1 5
1 8
1 5
1 4
1 8
1 3
1 5
1 5
1 7
1 7
2 3
1 2
1 1
1 2

Output:
6
9
5
8
1
7
0
0
0
0
0
4
0

Input:
96 141 151
94 95 96 15 36 76 48 59 46 34 6 39 43 2 54 64 71 91 18 3 79 50 89 61 40 88 51 67 37 52 41 30 29 8 55 26 9 14 82 17 63 19 56 74 87 31 5 38 60 10 66 83 35 62 1 77 90 68 24 70 23 22 13 7 45 4 20 53 32 78 73 86 11 85 72 21 28 42 44 57 93 75 92 80 47 12 33 16 84 58 69 25 81 65 27 49
18 43
31 68
12 47
41 46
18 29
7 70
72 86
46 90
84 93
26 69
54 68
48 61
49 80
10 46
14 85
77 88
10 28
20 56
49 57
7 40
4 54
35 80
32 67
16 61
24 83
20 94
58 66
67 72
3 35
70 85
39 78
63 79
...

Output:
96
95
94
93
92
91
90
89
88
87
86
85
84
83
82
81
80
79
78
77
75
74
73
72
71
70
69
68
67
66
65
64
40
63
62
60
59
58
57
56
55
54
53
51
50
61
49
48
47
46
45
44
43
42
41
39
38
37
36
35
34
33
32
31
30
0
29
28
0
26
25
17
52
0
24
20
18
16
15
14
10

Input:
95 135 175
65 40 61 17 58 55 77 84 79 27 35 54 87 36 25 2 45 43 63 34 89 15 49 60 42 20 10 9 7 38 5 74 52 16 56 14 6 29 53 57 46 78 28 95 8 72 32 50 85 66 62 4 13 3 19 39 48 41 33 31 70 37 1 64 44 51 18 94 83 82 11 23 21 47 22 30 24 75 92 93 88 76 80 59 91 67 12 69 81 71 68 90 26 73 86
39 74
6 32
78 81
43 93
71 79
59 77
31 49
29 88
22 56
5 70
39 46
53 58
17 19
18 64
11 67
14 69
72 80
18 40
5 60
6 80
5 45
63 83
8 55
79 93
65 91
15 67
6 23
21 68
57 84
24 85
19 85
51 67
11 69...

Output:
95
94
93
92
91
90
89
88
87
86
85
84
83
82
81
80
61
79
78
77
75
74
73
72
71
70
69
68
67
76
66
65
64
63
62
59
58
0
57
56
0
55
54
53
52
51
50
49
4
41
60
3
48
47
46
45
0
0
44
15
8
0
43
42
25
40
36
34
0
35
5
39
33
0
32
0
30
0
28
29
0
27
26
24
0
20
0
0
16
9
0
0
12
0

Input:
95 136 190
43 38 21 83 75 16 90 31 17 2 30 50 11 9 19 48 32 88 58 60 62 53 85 82 78 12 79 47 94 63 33 7 95 35 52 69 40 64 74 10 1 56 3 71 37 92 27 67 13 29 6 46 51 65 39 61 23 72 14 87 20 91 93 84 73 57 68 8 41 42 80 26 54 70 18 66 45 86 5 4 55 89 15 49 59 81 24 34 44 36 25 76 77 22 28
35 48
30 55
57 64
35 95
60 90
47 74
7 28
26 85
37 91
26 42
12 83
33 36
24 88
54 78
62 86
2 39
62 93
33 48
41 80
40 88
91 94
60 94
55 87
51 69
48 93
48 78
13 79
22 78
38 91
69 74
64 90
19 81
...

Output:
95
94
93
92
91
90
89
88
87
78
86
85
75
84
83
82
81
80
79
77
76
74
73
48
72
71
70
68
67
66
65
64
4
63
62
61
60
58
57
56
0
69
1
55
54
53
52
51
42
50
44
49
47
45
43
0
41
46
0
40
39
37
36
0
17
14
7
34
32
6
25
0
0
0
0
30
2
27
38
22
20
0
0
18
0
11
29
21
3
28
0
0

Input:
199998 299995 500000
153412 35198 17343 46228 6928 75192 114464 157343 77601 124480 35526 8250 159607 117598 127301 14907 142148 113646 9279 13964 100293 191098 67767 174884 195356 172276 148583 67937 76083 62111 74204 157877 6258 199948 110132 73279 133863 66457 141633 37349 102702 136082 172280 171155 107690 146380 79248 79444 90312 12813 111262 18340 130380 22636 47489 123750 92754 120437 132649 184554 120382 8761 70744 7602 161965 191117 148929 165312 41648 33800 30457 185926 175425 90428 162843 62284...

Output:
199998
199997
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
...

Input:
199996 299992 500000
134969 119070 62268 75542 161097 173429 45635 151168 19946 135122 74875 134424 31874 37302 79901 81696 42708 90725 196628 129748 21626 87953 174792 7460 158323 25320 68197 47874 14595 3536 14822 189176 199180 69986 20660 66406 31439 93214 26489 119279 158389 102844 118926 25739 118514 167586 111517 57976 166780 197301 88273 39379 137688 76319 110925 23009 54749 142749 137334 179650 188691 154104 59776 71041 164658 111663 167798 66632 13396 119714 175605 19059 63569 50549 84981 113073 ...

Output:
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
...

Input:
200000 299998 500000
63954 186266 141361 37431 119610 97083 85069 51029 71720 199562 148270 183111 93287 197272 132986 184628 76678 9926 112644 103293 26006 181326 94392 74861 7606 154319 81537 92058 167401 118222 60803 160416 97000 89617 128732 168038 98960 100507 31036 143779 400 182663 119262 45751 79146 87393 41734 105835 160167 168566 161531 94869 60050 54311 196202 98422 78561 168636 107719 154079 115735 44228 42704 151318 58277 191724 76745 93644 117287 4387 41455 178742 194641 151300 171235 131516...

Output:
200000
199999
199998
199997
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
...

Input:
199998 299996 500000
181007 145459 43706 122329 124404 59328 176095 51696 41499 43811 45123 82905 195328 80344 20782 102980 158516 166155 38254 6195 9192 21696 168146 166868 93724 127345 21765 81568 173820 158620 52734 168654 44342 80483 184804 79826 79596 144292 87781 155604 188568 20602 81604 101679 128809 27347 124214 194856 47065 54059 40486 79412 95100 93384 59132 156771 186347 187589 17444 35503 44710 176266 63308 159420 48713 151645 79239 191000 28002 112544 63362 50622 6545 153038 120370 80215 190...

Output:
199998
199997
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
...

Input:
199978 199971 247151
122905 77210 171173 112732 151982 126721 165720 29934 91387 187388 188392 70313 156833 145317 127748 192782 70892 137438 97296 103831 150427 196878 104095 134289 66928 156667 1317 467 46663 189057 35199 132170 95449 141615 49430 100725 89056 178237 60781 161876 99968 197781 38856 40660 10306 127540 132253 37153 121676 81157 147517 19903 32423 100856 113653 113853 9394 119349 30169 119457 196399 133093 59051 183693 173482 159337 199125 189757 163555 68269 75744 76142 67971 107116 19856...

Output:
199978
199976
199975
199974
199973
199972
199977
199971
199970
199969
199968
199967
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199954
199955
199953
199952
199950
199949
199948
199947
179863
199946
199945
199944
199943
199951
199942
199940
199941
199938
199937
199936
199934
199933
199932
199931
199930
199929
199927
199926
199924
199921
199920
199919
199939
199918
199917
199916
199966
199935
199915
199914
199928
199913
...

Input:
199906 199892 368111
4908 150212 132016 195480 71707 17329 98184 136565 122263 25450 123367 15397 122813 77282 57567 147067 149857 170740 168034 57918 195900 30630 154784 29648 33813 89456 73233 51489 165629 49973 130865 136786 38446 121330 131420 136542 131953 146986 149408 186040 57432 87912 141325 103719 198963 174496 115663 84444 119425 105263 78283 108070 53928 26995 53086 108517 143558 25423 29684 47323 58574 43763 183842 18542 20579 91187 179845 111089 58608 128026 20592 119716 35489 133023 24339 4...

Output:
199906
199898
199899
199894
199904
199886
199905
199851
199903
199902
199901
199888
199900
199897
199896
199895
199883
199893
199892
199891
199822
199884
199862
199890
199889
199875
199887
199864
199885
199882
199880
199863
199879
199848
199803
199881
199878
199845
199877
199876
199874
199873
199842
199872
199868
199840
199865
199859
199827
199826
199870
199801
199858
199856
199871
199855
199854
199819
199818
199804
199817
199869
199802
199853
...

Input:
199927 299916 317862
81031 17306 143702 145450 165821 44531 82986 131598 155613 52863 10233 143035 17754 58248 60778 27401 9520 139911 179900 32450 74610 39574 80568 68296 180932 162574 120287 159697 20721 11926 44622 19467 30784 108572 170660 176719 145116 190208 75479 108036 147482 92504 120613 80425 151710 188512 93298 184700 54887 198838 170651 99420 26215 21142 22195 30939 135228 182860 166957 54605 13426 149320 166196 45103 92221 19268 132409 174216 141507 94041 123608 76707 44111 162297 152998 6779...

Output:
199927
199926
199925
199924
199923
199922
199921
199920
199919
199918
199917
199916
199915
199914
199913
199912
199911
199910
199909
199908
199907
199906
199905
199904
199903
199902
199901
199900
199899
199898
199897
199896
199895
199894
199893
199892
199891
199890
199889
199888
199887
199886
199885
199884
199883
199882
199881
199880
199879
199878
199877
199876
199875
199874
199873
199872
199871
199870
199869
199868
199867
199866
199865
199864
...

Input:
199955 299946 386234
25899 52005 71447 179054 13803 4999 39800 189902 73662 22532 150515 20678 18942 84081 44849 56867 149436 2043 78621 119983 19416 137161 85737 118788 119127 69917 60506 17304 105819 90136 155602 3273 66507 17049 16963 4673 67980 133995 3411 42578 44416 13356 122719 196178 47240 150529 19037 18987 89874 53206 38723 137060 12257 53500 90868 146326 115864 189524 27239 168000 59405 133429 78012 194501 114169 111020 111219 170148 118058 102024 31123 19296 95434 188551 127743 56255 179001 16...

Output:
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
199930
199929
199928
199927
199926
199925
199924
199923
199922
199921
199920
199919
199918
199917
199916
199915
199914
199913
199912
199911
199910
199909
199908
199907
199906
199905
199904
199903
199902
199901
199900
199899
199898
199897
199896
199895
199894
199893
199892
...

Input:
200000 299997 500000
646 168693 20991 146409 49906 55323 29221 167407 150660 68954 94099 188060 138058 183566 44308 63254 140236 32321 194212 48066 55169 183956 132819 117368 101351 12915 168943 154167 27856 116838 128357 105631 166007 81786 69130 134925 92157 55655 114702 64149 89306 27281 122540 159078 43865 126344 36227 17277 143867 111348 100462 177011 195040 119060 52707 32185 96165 106207 112016 156841 43889 57834 8590 104268 103907 6217 184046 170236 98053 43671 21982 115710 188303 47018 11660 1291...

Output:
200000
199999
199998
199997
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
...

Input:
199994 299992 500000
76987 76446 175899 195489 84005 133401 152208 132385 166869 128988 101333 185849 90697 165775 68836 121627 21520 138533 31295 119030 163331 120388 33454 79984 156966 171188 40531 147153 14660 183267 55640 76326 199958 46438 118043 32207 174114 164260 159396 55603 1691 82020 164140 29025 155022 191812 175338 32530 113959 166912 85029 24731 178277 152816 90196 7489 166903 136823 161636 37728 11511 96751 85511 6441 64103 167754 144532 148407 131241 19767 25205 170713 95862 94693 168604 4...

Output:
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
...

Input:
199992 299991 500000
70710 168311 98352 90645 184806 93638 136900 12825 2009 41454 112976 160766 185637 164308 100967 161591 91822 177386 13271 51019 11398 120138 194791 95113 151446 151123 98922 184576 199341 187470 52721 68937 21575 10953 64316 178006 125932 144143 84859 105933 28907 85390 128004 26767 61698 163640 114724 72661 148905 67807 113774 62301 65383 179311 109997 152030 116397 179654 83378 121519 184778 165927 39760 55022 106013 177392 88389 38378 134010 141937 28184 111496 135426 183262 13713...

Output:
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
199930
199929
...

Input:
199996 299993 500000
20847 72720 159447 40660 96829 20582 9244 77949 128895 53362 87933 105252 109019 27921 196577 8773 69029 199855 182759 29000 65007 130461 87323 126371 160303 13976 39516 44983 101211 112080 68566 42179 149325 19350 77651 185327 171060 1458 107124 67569 65668 30382 36677 112601 128214 39781 97559 41321 142074 126308 196377 67991 72428 25148 142520 164687 64059 188244 195027 123254 185566 179824 140849 89269 61756 63527 191320 70764 91867 77116 199170 56429 82021 5810 140014 15884 12500...

Output:
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
...

Input:
199994 299991 500000
60519 158311 134576 62313 30711 74292 72959 138863 57080 76168 99874 61017 130415 136605 122902 3244 138302 70386 67924 39125 108905 155795 21209 190973 109684 51478 7746 70960 103252 25583 124668 142548 52264 159260 13733 98035 84572 165888 144205 194229 29857 125204 29970 147218 66714 28696 130729 58286 117317 162262 81119 123763 70603 169946 36684 45135 133905 63273 38936 25828 54397 188263 154654 110848 37899 109113 92555 188866 167467 66215 21842 53684 296 172316 108535 151299 39...

Output:
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
...

Input:
199993 299990 500000
139264 116052 180847 65644 1957 69062 133537 77818 24122 3148 88158 133011 83965 59266 162608 63772 156123 65464 159593 154803 53503 38421 132185 158440 179908 139991 11899 132916 23421 87079 160234 101407 120400 69389 66197 69937 126591 135195 84064 13316 31678 99409 65980 9199 127729 193787 159073 47710 145226 174644 13690 102375 127856 38775 74141 106676 16426 189512 61829 116400 84890 6191 182857 2139 65962 170884 54618 179270 41519 105080 1278 167644 56380 52455 180492 53889 1447...

Output:
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
199930
...

Input:
199991 299989 500000
124653 25916 159224 176722 25988 184620 166214 21954 114831 142424 82097 41166 183981 118589 162445 175877 88166 34884 167268 146467 33213 79243 170443 198175 77873 394 74034 171812 148704 11853 86516 116753 73458 58417 35259 2356 71738 51209 118950 11947 30465 431 75327 170871 136277 135351 61744 57048 141516 146208 54586 48275 24227 181418 77604 183925 84117 127607 67264 147824 87774 15226 103847 155488 117325 57613 110875 126289 32535 82741 50618 189671 5264 41052 150568 26295 3129...

Output:
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
199930
199929
199928
...

Input:
199996 299993 500000
198118 141242 163773 143460 105378 29566 58798 79290 77701 126756 89258 140733 73363 4213 10517 105680 95739 166785 54245 69849 77066 193496 76803 3183 81295 142013 148825 91849 130143 126938 194458 68567 193183 36951 66002 160653 114420 107430 57502 82786 178794 53320 10629 1934 15815 169936 37032 132075 59017 22755 57697 307 10355 127413 139206 73293 85328 91694 169819 45846 62652 136242 58347 199476 179846 160470 14234 140052 52147 13185 120155 85718 33994 128769 137106 71267 18324...

Output:
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
...

Input:
199994 299990 500000
120584 8788 107728 138096 118712 140346 48551 160087 189072 92072 143021 30862 195391 57948 17488 104504 51633 40813 155845 118131 94846 97591 130473 43326 25370 168003 69518 9128 73180 163541 158025 39217 189995 34651 121695 195064 196001 73348 166330 3859 88642 36780 43450 184702 118964 151462 12968 31005 78279 139379 145886 110818 100923 47195 196461 107643 90838 180665 55851 88323 56126 153783 97234 153714 66316 23567 125905 87081 102781 77358 52153 91134 27964 24595 181000 44262 ...

Output:
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
...

Input:
199998 299995 500000
189779 163106 135461 67146 81677 13459 72510 99872 4973 121440 97259 70596 136217 85953 99801 96600 112509 44845 57680 115636 178565 21240 194203 66061 174953 129523 199648 13821 147117 4848 177571 138956 191832 4217 113008 42254 36004 100742 143366 740 8123 147212 118906 99612 80684 30041 121425 150170 40649 137726 78427 45290 121631 16286 95751 55670 181101 53698 12684 118356 75768 114907 115344 190525 69229 150297 171180 89354 52661 145053 25957 76037 91981 98616 52942 172974 75414...

Output:
199998
199997
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
...

Input:
199992 299989 500000
25026 90086 14470 53894 5710 11993 1334 126038 95880 196386 26470 96834 41474 4861 59488 24632 85581 83231 72417 128995 168878 30920 101768 139736 111493 66274 37677 27 6349 5376 197489 46856 6245 90219 56772 116903 84082 73216 78113 176667 162203 147010 138152 143404 15638 18085 40989 42682 114845 59298 71518 155416 107101 160517 12384 171128 56601 79725 127801 125975 69241 132331 175635 104195 107319 109662 170076 157116 126872 2810 95701 29989 50785 14778 42950 85986 2114 129307 87...

Output:
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
199930
199929
...

Input:
199996 299992 500000
126903 69209 118680 187422 185783 190922 10479 152408 18545 195284 148240 107035 101123 27371 117840 92028 165948 66684 73336 199677 64828 188217 22228 105790 45391 22362 68103 38455 163084 97652 44348 155807 19492 158390 29249 139592 181520 194819 118133 92456 190705 48990 101350 85558 120452 188919 145597 83851 407 11836 173080 68484 109054 129450 148314 162104 116991 103160 68543 3350 107542 100013 96532 120695 128714 105239 5490 7310 25177 82543 102178 180049 81421 142824 73931 16...

Output:
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
...

Input:
199999 202998 500000
97471 108530 933 115050 64659 153537 127372 174580 43937 188492 141628 47205 108901 33242 102205 180536 84359 28347 84228 138322 137172 63800 69520 518 77254 184544 189346 112921 120219 100529 93581 121470 89583 171621 82909 176858 40505 144937 175546 43308 162260 100204 146360 47458 45744 116607 2308 4468 100994 87139 151709 175828 11485 51089 104125 193451 18840 95593 170723 104523 69112 100353 95230 187996 110080 117064 70242 98965 184258 183885 164655 97094 87069 129610 104505 109...

Output:
199999
199998
199997
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
...

Input:
199993 202991 500000
166879 76526 85524 92747 184800 32033 193808 160273 70328 164198 141696 5666 184779 199493 95052 26005 113052 121276 34404 53075 2594 65840 53261 132714 14889 177562 137368 127015 117182 127386 38119 35539 22560 34886 191861 123842 155250 88940 20168 33909 192499 50916 22419 25540 89412 193674 83179 66142 29968 198645 145018 26044 6124 156863 45302 34260 148687 92114 23063 76344 40946 144752 23472 104947 63498 14735 155603 38366 98716 43783 168332 196622 111547 69923 182560 24618 5743...

Output:
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
199930
...

Input:
199991 202990 500000
197823 51331 94238 169670 35064 178223 64617 70187 155237 76449 72861 120250 5514 191663 39923 45567 60114 91955 193047 190885 186773 100743 70406 13365 52653 77050 8227 185379 38408 79131 26552 72214 55802 108890 8214 47765 139514 101534 49717 93180 31416 43449 60761 22545 191039 59775 22925 90190 134200 67444 124533 9500 165237 141632 12240 141364 108534 70174 175308 144353 36091 14134 193440 95865 173833 188162 155871 172609 166726 117377 93772 48242 93663 56811 53655 87385 107656 ...

Output:
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
199930
199929
199928
...

Input:
199991 202990 500000
68475 191493 51607 98800 152301 100636 143191 27160 108526 25770 133278 22937 108599 55080 61128 174371 187635 113939 100905 26150 11113 14656 190525 184530 42412 150061 45578 186226 174332 53272 161487 18512 76238 196313 126391 34622 29097 198912 145836 106383 138251 184780 56208 139249 178200 76748 57596 50707 20477 95638 65539 197066 20663 51278 174235 12955 78302 61257 87367 3717 62847 125184 149852 143508 65798 123482 32958 144114 143135 6533 19933 30681 173453 39655 72280 67058 ...

Output:
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
199930
199929
199928
...

Input:
199999 202998 500000
171570 87649 199932 93319 8456 88799 80005 132713 86194 115428 73151 124726 25308 35856 41771 120151 142480 10321 110198 50741 26916 188430 143924 69914 22812 43754 192441 173871 198564 136486 92733 91651 58525 187663 106442 107703 196017 116331 60579 154434 12274 90254 107748 51856 152852 17833 14811 70354 47580 23349 131131 150593 41660 148103 10484 40781 151513 153771 57547 180669 77946 136716 164584 9116 7833 47744 74778 4321 82516 132489 31345 32838 177293 90533 67870 49854 15471...

Output:
199999
199998
199997
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
...

Input:
199998 299984 320049
191435 112176 167007 195345 100748 119718 95963 84827 73351 39288 90785 80017 197684 48340 47637 5976 196530 110787 160847 101272 190333 32932 183488 36599 49647 89698 46402 3405 53323 95890 97618 161535 190041 62726 66399 133016 144969 174320 59212 12044 14892 85475 152835 56952 69045 17697 110372 36465 132855 109441 92881 196943 12274 190748 128526 105477 89547 36204 68217 15696 44525 20983 52811 16780 96982 102286 194844 47151 117468 57766 195445 144111 52672 106292 107035 79215 15...

Output:
199998
199997
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
...

Input:
199996 299977 443135
188404 137821 170302 193428 112333 171204 187973 10284 176362 93301 19960 74549 135441 60626 113274 39253 117415 182422 42077 69224 15003 171206 18425 28514 78926 102190 67268 96755 17705 74618 161513 101935 28235 159361 84215 146832 158392 3762 7618 104153 182347 86704 145721 59775 163671 194431 88683 177936 135675 92174 76949 135566 177808 112173 64875 82303 171240 143165 26840 134063 45850 173570 148385 154410 20052 131153 62350 138015 71227 197165 12135 35481 184152 184690 161945 ...

Output:
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
...

Input:
199994 299982 371616
198651 179181 66898 114664 25305 108606 45704 78268 43280 98602 97405 41507 104776 6670 27344 153984 187983 125687 87136 151408 69927 193382 99192 155010 48194 148300 141776 95489 30812 89654 116421 104291 155181 170080 75334 188341 119346 155331 136192 143295 46458 1493 139196 121314 78889 54795 103869 150791 87349 121829 88220 117350 152922 104844 57790 184805 11161 164412 1265 107771 160012 38845 57744 47816 86747 148631 172122 192902 73870 108782 118413 55185 173936 154880 106041 ...

Output:
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
...

Input:
199994 299982 314117
98243 142831 76219 198147 172239 162074 88424 26528 179208 157724 70326 120994 25336 195334 137468 110096 70765 19906 186402 56682 139077 178367 48566 106994 166647 127631 178834 40218 128338 176057 24965 83383 10141 36265 112636 195948 32413 85295 52987 31325 7800 123552 174634 98683 40146 39950 165187 77379 97490 74767 193155 9535 37214 90034 12631 117607 128265 195511 21629 112926 179431 159951 79098 119540 100766 75455 37940 157242 164467 57983 72151 88765 188714 38552 67833 17976...

Output:
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
...

Input:
199992 299977 305122
72109 136779 12035 106622 102526 195974 127963 23670 56671 28048 45551 96577 120292 192320 23418 109689 14327 138287 118228 185499 86505 45864 52422 143419 43940 79843 175253 97495 76979 37128 95230 190785 17594 152042 109007 316 79039 15150 46997 71837 171052 148373 138462 140918 3361 34377 122510 145266 156148 16993 20653 26352 74766 183681 145969 183668 174390 153875 132654 9514 43864 168709 197808 122740 45365 3773 65364 45522 95470 100270 20504 115875 133407 118497 154296 175221 ...

Output:
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
199930
199929
...

Input:
199996 299984 371086
3007 38825 186229 37453 79438 45048 124757 114047 127221 38306 172198 10363 6792 33004 70884 45648 15628 171215 118894 199088 118614 145484 37052 123246 109719 13776 46336 198852 130033 18280 144998 156503 141840 51119 85378 67677 13401 191095 40357 114962 38089 167921 104569 46199 124320 40539 39392 50740 102461 162498 140515 49488 141567 61810 162525 17534 95687 35647 133238 102918 157292 160211 1542 138468 98487 153156 52002 19413 104378 66350 159553 106729 140436 49139 170668 4481...

Output:
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
...

Input:
199994 299981 476844
181810 197363 36888 46502 19678 73881 191473 185314 181034 63794 143233 92750 39645 91133 118326 7234 34574 87590 64297 119504 113376 13891 7792 122131 195735 185675 112179 112670 25362 87530 175320 10398 157198 138965 167642 115314 34085 85969 158239 130831 52180 41181 157970 119137 90365 139188 199991 157407 180652 61380 63802 53321 180223 96938 139275 147391 194677 72107 167686 42851 182109 92945 90869 125891 112597 9574 25298 71377 187840 47789 116007 94466 173261 189088 110952 51...

Output:
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
...

Input:
199994 299986 437772
187932 130751 56170 140535 173942 117313 14161 194467 36189 92873 179812 135431 36778 90193 30983 73774 81288 121450 187395 122852 90394 106578 184055 16272 162449 58446 25082 84936 21261 67762 61624 185209 180637 34952 121947 46295 12937 27974 44852 136865 33830 167782 45588 131608 53275 88828 136549 69288 179895 188850 115086 172510 86562 81897 102738 62811 169274 27764 72227 40516 113758 87977 102764 184067 24738 107065 84808 115993 123685 141851 82640 140944 69453 192489 3998 5768...

Output:
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
...

Input:
199992 299973 442570
68152 47977 116106 103424 20174 47727 77050 1880 20334 182191 172486 187237 32167 21582 42274 21484 63586 192594 194694 105162 187841 105551 112861 164381 178605 35054 68352 98991 59456 87879 56302 27039 180388 187941 22949 45610 684 62002 24289 10236 83790 102986 138356 163811 112586 132660 178514 104411 69745 182268 74372 154109 199523 196763 71173 78304 128936 157980 21146 15968 6578 62243 24874 110154 73318 113476 144865 7741 142460 101484 58956 82784 49549 66456 87768 193447 1985...

Output:
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199934
199933
199932
199931
199930
199929
199928
...

Input:
199996 299985 498855
137750 118252 72566 186838 149984 138986 97856 31878 84598 94843 151007 138795 110831 78087 161934 63118 10051 139049 122095 171804 116283 80902 61307 96137 134771 135002 6239 6264 160224 87372 156715 8938 39133 129104 139779 78029 176245 124775 31408 42741 138095 138362 57077 128050 74756 72345 65595 43115 88862 180876 52497 78462 61301 144017 10956 41742 151821 77414 23353 196137 177974 118405 124616 83547 138908 93128 167765 35568 56691 3629 13312 82104 168312 171704 47397 125191 1...

Output:
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
...

Input:
199991 299980 302357
150511 148850 5028 3357 115247 133375 169486 126576 11675 52241 116797 132988 16301 169903 144123 163459 84343 44778 199301 111170 175257 25252 23078 55915 132367 50266 195386 95476 78944 35933 41598 5880 81439 194576 85985 154932 180357 75386 61655 27070 4410 15368 32414 154971 164548 137314 91666 182014 29598 184607 103855 169128 192837 122472 82630 132541 134139 74321 90228 22765 186716 148462 177068 191828 37304 54351 63544 172974 168904 30440 151889 143147 1603 120197 94097 76305...

Output:
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
199930
199929
199928
...

Input:
199999 299973 475161
168303 63596 126562 143371 159987 60676 65533 54088 23914 12934 152471 85325 104744 104830 59 191081 156468 75110 169115 9162 94990 18285 14418 99978 1048 54954 154149 38307 135262 170892 105115 1422 32530 24557 98991 61765 56785 60505 128579 36675 63248 93069 163339 91767 7539 155316 196947 37908 122413 111267 57256 29487 147569 12499 48301 40616 33209 115088 118015 97399 78704 125242 43983 88966 78365 134003 7700 26947 125810 46529 22647 62217 177626 161964 171189 28437 182777 44835...

Output:
199999
199998
199997
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
...

Input:
199993 299981 344745
146218 4670 17598 25266 199004 84749 69516 151012 17322 176694 1128 45359 10978 127833 149628 162128 80845 588 153908 110025 118883 186655 139889 28171 15486 61174 192140 73344 141077 82209 65174 57443 33618 44414 175663 48399 186194 182555 92629 25716 38916 5500 88469 54608 149571 146197 2830 22216 179142 51597 180342 103848 196213 185753 148135 127711 179737 36063 185163 72095 195572 8748 79697 14394 160874 53640 155798 43116 107562 188115 156445 185486 141918 69047 44164 47191 1558...

Output:
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
199930
...

Input:
199997 299977 358941
198927 2931 16991 128017 20708 163232 132266 119214 111856 175646 32228 1394 12932 191241 144654 195882 177750 139832 184692 154986 124746 32990 197086 82438 51140 31760 77621 118295 173875 104616 28720 104167 54406 96144 141918 65346 73206 60659 182460 158178 95457 80215 195815 152286 34972 188730 170850 109130 183941 129369 127526 100068 112365 116361 3436 98464 60345 121148 2599 12611 172239 158604 27664 33258 14126 172142 116409 135013 67277 4698 115984 8286 44519 41311 143068 798...

Output:
199997
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
...

Input:
199995 299978 340338
93408 136644 116330 9068 150509 197921 112933 10216 110088 65641 94922 107831 176070 119609 143963 30130 78918 199368 53841 20726 160638 86637 38620 125813 26608 155604 177136 7995 134011 193944 45486 159672 18048 3965 3087 130672 106307 184652 95760 169411 116002 11782 199017 161909 111878 175971 152580 128299 18986 132087 86190 120127 16401 125462 21283 49888 195688 176970 176989 57258 190933 83759 40438 39046 9945 174270 99904 126906 136461 85289 187958 147135 40443 12676 14562 668...

Output:
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
...

Input:
199999 299978 354096
60249 7545 87998 117654 130859 83699 184947 63666 192212 94766 172033 55111 156962 175202 161583 151752 23639 134581 149917 30198 189751 55479 3643 144413 80929 129459 79445 71431 48034 97110 65994 199666 198484 134113 40892 12666 6100 48032 125813 92199 116545 18251 95381 132284 133610 62844 127008 173684 56996 4212 147006 73909 191257 11156 73317 52387 191680 178641 137213 81503 177866 80728 38973 87370 28204 118392 187905 103068 111875 148681 16568 34633 132785 87526 8011 152230 61...

Output:
199999
199998
199997
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
...

Input:
199993 299975 487718
68563 95943 55843 174068 187026 184309 190833 159914 9753 81400 4249 67471 165023 100985 91545 65378 162650 174392 178429 8350 70507 17594 65502 128309 93459 136420 69415 3108 192249 95043 36866 27615 58494 105938 34136 67267 28284 15942 143834 51585 10915 180071 183700 34575 199835 6551 159726 139130 405 84658 13865 190391 76416 68278 168168 177767 142077 187833 22874 183202 140258 35005 149834 14498 52912 113937 37353 2061 49447 56337 13339 22529 138145 90960 174160 27280 21413 1823...

Output:
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
199930
...

Input:
199997 299977 463944
104094 50638 106125 35166 115684 188432 146043 198414 163534 70373 107837 28582 149154 147334 180178 191910 159894 101987 145527 125450 123363 118428 76960 71833 191068 163420 155511 9174 46354 170708 107384 21286 77218 68544 119423 59341 199302 33071 173086 128672 22570 62180 161643 25803 26957 179100 16388 142802 195563 110101 21544 163813 104064 62064 109272 183354 156480 137858 57227 68259 130274 160209 61372 86212 35408 41316 13570 127050 195941 52240 27116 63851 523 104411 30428...

Output:
199997
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
...

Input:
199995 299992 500000
2595 164276 86631 147729 157802 64691 194672 197828 153815 21961 169253 131898 22703 51966 119265 97063 52940 92909 137510 55702 102687 21064 87134 12824 53012 149555 126273 88575 177140 149279 77160 192225 4326 180032 158569 13401 16706 136982 10435 56528 39052 177138 27197 30227 79357 158928 127775 121309 35407 157949 65438 199145 10023 149975 106515 56538 116546 112139 173051 197336 97480 51673 27220 178715 59986 56959 82247 185105 93154 184749 155327 166058 62175 102392 10186 2688...

Output:
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
...

Input:
199994 299991 500000
122631 26814 115227 69881 17553 49453 93023 34901 78780 130372 15462 126599 178130 3758 59693 43835 167944 10399 63240 198 188595 64079 91530 188317 105315 151693 170177 38837 196071 179854 170826 142366 146871 126457 112383 181361 190213 177123 56396 18348 112918 144872 34861 187876 89055 167299 82384 14627 56045 98790 33286 36343 109886 24057 65462 1049 161625 89607 198234 120105 179057 121033 15681 125975 56821 112569 157320 113122 116230 197937 19482 183441 151338 55739 133591 193...

Output:
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
...

Input:
200000 299998 500000
29383 74944 165424 78298 106976 26932 163545 72152 94609 45167 137330 20438 178263 33957 104688 107228 126631 162710 54842 138784 177917 133664 141375 2779 82534 196161 129297 158237 79970 135726 161078 39155 173327 43749 20080 55776 53471 122465 110943 30080 81144 91668 160128 167606 46796 43291 109186 171771 39105 172908 41566 67628 51036 86716 176441 162840 198834 163979 84900 24059 172177 11640 40903 76450 191680 117544 96812 62736 71847 91757 156359 37694 198871 177606 178888 503...

Output:
200000
199999
199998
199997
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
...

Input:
199994 299991 500000
77159 96176 60632 113942 190769 37274 66985 160173 23055 178906 146956 97412 58199 5231 16903 71107 111971 1808 166329 20931 87936 108114 141640 184977 106436 19962 161810 89385 76874 108148 94156 183813 136717 135205 142096 79304 170576 158226 14655 121167 57549 1173 5774 174211 107717 84267 54577 6382 146382 56329 135125 170526 27924 179941 166672 186452 91964 195694 47255 138062 114314 164871 11579 66395 115817 81614 101080 67619 108786 2858 143800 152724 51199 39796 81449 158076 9...

Output:
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
...

Input:
199998 299994 500000
73932 124525 147364 129483 73626 55750 187902 197483 183331 98879 60872 63495 189660 35080 168095 166882 28671 48144 132548 41911 91574 191074 78732 198948 116392 97985 174867 186750 11569 9646 29326 12511 185566 10257 188506 190056 41576 20631 77873 134045 165826 8913 158560 39720 148033 196885 5480 128436 1151 113340 152189 181722 82885 15343 181239 138170 173018 11751 140237 149001 87186 182510 86430 43351 123319 17614 89942 95433 5541 36532 118917 70365 80870 98268 3243 24505 1073...

Output:
199998
199997
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
...

Input:
199996 299992 500000
95078 31753 62552 59003 136518 193886 173167 161703 59980 96378 166385 178348 174088 129724 100865 2964 180237 135663 137221 16329 107464 98228 152063 158658 27711 125138 128068 154127 12238 146478 154796 177693 150447 165352 174035 90365 187759 175127 147962 148980 135952 135433 182219 104647 143468 111985 20461 183931 34431 83249 141194 27953 160434 126613 54362 19146 153287 157594 69225 99629 158679 111191 14104 48192 33487 125089 138661 190654 98467 157995 157027 168237 98655 1264...

Output:
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
...

Input:
200000 299995 500000
102802 82789 138815 137692 91359 120728 160302 141889 20281 169039 102385 85472 56528 195081 53384 76593 127850 111642 188955 74166 117501 122640 91284 83544 116614 146782 186512 181109 136335 113305 41859 89979 73963 13326 118094 17818 18414 124640 33610 36479 105130 144081 170184 66744 168661 43244 174192 44528 14709 56087 35319 166437 61617 38929 77870 105379 128345 198523 47574 9672 180938 87867 13169 27521 189455 144694 126556 80263 90395 72362 7907 79372 88857 174533 41092 11349...

Output:
200000
199999
199998
199997
199996
199995
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
...

Input:
199994 299992 500000
78740 107111 63218 111629 121716 77886 113766 54160 5382 111745 81729 163768 94027 106312 46074 76974 89979 23943 38113 117609 153875 138464 61287 54489 170804 53123 100964 10363 49427 53386 135659 138210 83853 60123 173648 71231 119765 108074 121431 155987 169034 183068 49177 165334 145371 134549 69876 189175 37713 63611 102956 4406 135555 19801 179259 13934 104693 188297 86758 120246 176574 153984 160 63497 31646 9002 150832 98703 128381 72956 88560 69929 84141 44345 79173 146103 10...

Output:
199994
199993
199992
199991
199990
199989
199988
199987
199986
199985
199984
199983
199982
199981
199980
199979
199978
199977
199976
199975
199974
199973
199972
199971
199970
199969
199968
199967
199966
199965
199964
199963
199962
199961
199960
199959
199958
199957
199956
199955
199954
199953
199952
199951
199950
199949
199948
199947
199946
199945
199944
199943
199942
199941
199940
199939
199938
199937
199936
199935
199934
199933
199932
199931
...

Input:
2 1 3
1 2
1 2
1 1
1 1
1 1

Output:
2
1
0


Andrey thinks he is truly a successful developer, but in reality he didn't know about the binary search algorithm until recently. After reading some literature Andrey understood that this algorithm allows to quickly find a certain number $$$x$$$ in an array. For an array $$$a$$$ indexed from zero, and an integer $$$x$$$ the pseudocode of the algorithm is as follows:  Note that the elements of the array are indexed from zero, and the division is done in integers (rounding down).Andrey read that the algorithm only works if the array is sorted. However, he found this statement untrue, because there certainly exist unsorted arrays for which the algorithm find $$$x$$$!Andrey wants to write a letter to the book authors, but before doing that he must consider the permutations of size $$$n$$$ such that the algorithm finds $$$x$$$ in them. A permutation of size $$$n$$$ is an array consisting of $$$n$$$ distinct integers between $$$1$$$ and $$$n$$$ in arbitrary order.Help Andrey and find the number of permutations of size $$$n$$$ which contain $$$x$$$ at position $$$pos$$$ and for which the given implementation of the binary search algorithm finds $$$x$$$ (returns true). As the result may be extremely large, print the remainder of its division by $$$10^9+7$$$.

Print a single number — the remainder of the division of the number of valid permutations by $$$10^9+7$$$.

The only line of input contains integers $$$n$$$, $$$x$$$ and $$$pos$$$ ($$$1 \le x \le n \le 1000$$$, $$$0 \le pos \le n - 1$$$) — the required length of the permutation, the number to search, and the required position of that number, respectively.

Input: 4 1 2

Output: 6

Input: 123 42 24

Output: 824071958

Input: 1 1 0

Output: 1

Input: 1000 501 501

Output: 646597996

Input: 1000 999 799

Output: 0

Input: 2 1 1

Output: 1

Input: 2 2 0

Output: 0

Input: 3 1 2

Output: 0

Input: 3 2 2

Output: 1

Input: 3 3 1

Output: 0

Input: 4 2 0

Output: 2

Input: 4 3 2

Output: 2

Input: 4 4 3

Output: 6

Input: 7 1 1

Output: 720

Input: 7 7 6

Output: 720

Input: 7 2 4

Output: 120

Input: 7 4 4

Output: 216

Input: 8 4 1

Output: 1440

Input: 8 1 5

Output: 0

Input: 8 8 7

Output: 5040

Input: 8 7 6

Output: 720

Input: 8 3 0

Output: 1440

Input: 9 1 7

Output: 0

Input: 9 9 5

Output: 0

Input: 9 5 5

Output: 5760

Input: 9 4 4

Output: 7200

Input: 9 3 3

Output: 8640

Input: 10 1 1

Output: 362880

Input: 10 10 9

Output: 362880

Input: 10 5 5

Output: 43200

Input: 10 3 7

Output: 70560

Input: 10 4 4

Output: 90720

Input: 10 6 6

Output: 43200

Input: 10 7 7

Output: 90720

Input: 10 9 5

Output: 0

Input: 74 16 54

Output: 625981152

Input: 63 15 45

Output: 581829795

Input: 54 4 47

Output: 911648281

Input: 92 22 62

Output: 628152721

Input: 82 15 14

Output: 187724629

Input: 91 60 48

Output: 233776714

Input: 91 51 5

Output: 660447677

Input: 70 45 16

Output: 578976138

Input: 61 21 16

Output: 516359078

Input: 61 29 15

Output: 252758304

Input: 69 67 68

Output: 736622722

Input: 59 40 1

Output: 384105577

Input: 98 86 39

Output: 132656801

Input: 97 89 29

Output: 673334741

Input: 78 66 16

Output: 703501645

Input: 777 254 720

Output: 57449468

Input: 908 216 521

Output: 601940707

Input: 749 158 165

Output: 849211382

Input: 535 101 250

Output: 111877808

Input: 665 5 305

Output: 400272219

Input: 856 406 675

Output: 663368144

Input: 697 390 118

Output: 844062514

Input: 539 246 0

Output: 410139856

Input: 669 380 461

Output: 921432102

Input: 954 325 163

Output: 917113541

Input: 646 467 58

Output: 214437899

Input: 542 427 258

Output: 830066531

Input: 562 388 191

Output: 935998075

Input: 958 817 269

Output: 513948977

Input: 1000 888 888

Output: 644649893

Input: 1000 2 2

Output: 22779421

Input: 534 376 180

Output: 984450056

Input: 1000 1 1

Output: 756641425

Input: 1000 3 3

Output: 606772288

Input: 1000 500 500

Output: 646597996

Input: 1000 1000 999

Output: 756641425

Input: 1000 501 50

Output: 636821580

Input: 6 4 3

Output: 12

Input: 3 2 1

Output: 1

Input: 100 5 50

Output: 469732450

Input: 999 490 499

Output: 998308393

Input: 7 3 3

Output: 288

Input: 10 7 5

Output: 4320

Input: 123 1 24

Output: 0

Input: 5 5 2

Output: 0


Today is the final contest of INOI (Iranian National Olympiad in Informatics). The contest room is a row with $$$n$$$ computers. All computers are numbered with integers from $$$1$$$ to $$$n$$$ from left to right. There are $$$m$$$ participants, numbered with integers from $$$1$$$ to $$$m$$$.We have an array $$$a$$$ of length $$$m$$$ where $$$a_{i}$$$ ($$$1 \leq a_i \leq n$$$) is the computer behind which the $$$i$$$-th participant wants to sit.Also, we have another array $$$b$$$ of length $$$m$$$ consisting of characters 'L' and 'R'. $$$b_i$$$ is the side from which the $$$i$$$-th participant enters the room. 'L' means the participant enters from the left of computer $$$1$$$ and goes from left to right, and 'R' means the participant enters from the right of computer $$$n$$$ and goes from right to left.The participants in the order from $$$1$$$ to $$$m$$$ enter the room one by one. The $$$i$$$-th of them enters the contest room in the direction $$$b_i$$$ and goes to sit behind the $$$a_i$$$-th computer. If it is occupied he keeps walking in his direction until he reaches the first unoccupied computer. After that, he sits behind it. If he doesn't find any computer he gets upset and gives up on the contest.The madness of the $$$i$$$-th participant is the distance between his assigned computer ($$$a_i$$$) and the computer he ends up sitting behind. The distance between computers $$$i$$$ and $$$j$$$ is equal to $$$|i - j|$$$.The values in the array $$$a$$$ can be equal. There exist $$$n^m \cdot 2^m$$$ possible pairs of arrays $$$(a, b)$$$.Consider all pairs of arrays $$$(a, b)$$$ such that no person becomes upset. For each of them let's calculate the sum of participants madnesses. Find the sum of all these values.You will be given some prime modulo $$$p$$$. Find this sum by modulo $$$p$$$.

Print only one integer — the required sum by modulo $$$p$$$.

NoteIn the first test, there are three possible arrays $$$a$$$: $$$\{1\}$$$, $$$\{2\}$$$, and $$$ \{3\}$$$ and two possible arrays $$$b$$$: $$$\{\mathtt{L}\}$$$ and $$$\{\mathtt{R}\}$$$. For all six pairs of arrays $$$(a, b)$$$, the only participant will sit behind the computer $$$a_1$$$, so his madness will be $$$0$$$. So the total sum of madnesses will be $$$0$$$.In the second test, all possible pairs of arrays $$$(a, b)$$$, such that no person becomes upset are:  $$$(\{1, 1\}, \{\mathtt{L}, \mathtt{L}\})$$$, the sum of madnesses is $$$1$$$;  $$$(\{1, 1\}, \{\mathtt{R}, \mathtt{L}\})$$$, the sum of madnesses is $$$1$$$;  $$$(\{2, 2\}, \{\mathtt{R}, \mathtt{R}\})$$$, the sum of madnesses is $$$1$$$;  $$$(\{2, 2\}, \{\mathtt{L}, \mathtt{R}\})$$$, the sum of madnesses is $$$1$$$;  all possible pairs of $$$a \in \{\{1, 2\}, \{2, 1\}\}$$$ and $$$b \in \{\{\mathtt{L}, \mathtt{L}\}, \{\mathtt{R}, \mathtt{L}\}, \{\mathtt{L}, \mathtt{R}\}, \{\mathtt{R}, \mathtt{R}\}\}$$$, the sum of madnesses is $$$0$$$. So, the answer is $$$1 + 1 + 1 + 1 + 0 \ldots = 4$$$.

The only line contains three integers $$$n$$$, $$$m$$$, $$$p$$$ ($$$1 \leq m \leq n \leq 500, 10^8 \leq p \leq 10 ^ 9 + 9$$$). It is guaranteed, that the number $$$p$$$ is prime.

Input: 3 1 1000000007

Output: 0

Input: 2 2 1000000009

Output: 4

Input: 3 2 998244353

Output: 8

Input: 20 10 1000000009

Output: 352081045

Input: 5 2 1000000007

Output: 16

Input: 500 498 1000000007

Output: 497900737

Input: 10 9 1000000007

Output: 904119416

Input: 7 4 1000000009

Output: 31488

Input: 8 8 700001153

Output: 247497204

Input: 6 3 999999487

Output: 768

Input: 310 228 998244799

Output: 861313351

Input: 385 76 998244353

Output: 750286580

Input: 259 76 998244353

Output: 41310904

Input: 459 14 200003077

Output: 142997933

Input: 1 1 1000000007

Output: 0

Input: 498 155 998244799

Output: 673213318

Input: 372 309 1000000009

Output: 698627891

Input: 44 19 998244799

Output: 81944049

Input: 70 39 700001153

Output: 401935379

Input: 282 190 300001657

Output: 210852530

Input: 370 100 1000000007

Output: 112411341

Input: 234 21 200003077

Output: 137641479

Input: 194 184 200003077

Output: 76845836

Input: 499 497 998244799

Output: 514945258

Input: 500 117 1000000007

Output: 234794832

Input: 45 41 200003077

Output: 176259818

Input: 2 1 1000000007

Output: 0

Input: 2 2 1000000007

Output: 4