Submission details
Task:Freight trains
Sender:aalto25g_006
Submission time:2025-09-29 17:08:13 +0300
Language:Python3 (PyPy3)
Status:READY
Result:
Test results
testverdicttime
#10.06 sdetails
#20.06 sdetails
#30.06 sdetails
#40.07 sdetails
#50.07 sdetails
#60.06 sdetails
#70.06 sdetails
#80.06 sdetails
#90.06 sdetails
#100.06 sdetails
#110.06 sdetails
#120.06 sdetails
#130.06 sdetails
#140.06 sdetails
#150.06 sdetails
#160.06 sdetails
#170.07 sdetails
#180.06 sdetails
#190.06 sdetails
#200.06 sdetails
#210.06 sdetails
#220.06 sdetails
#230.06 sdetails
#240.06 sdetails
#250.06 sdetails
#260.06 sdetails
#270.06 sdetails
#280.06 sdetails
#290.06 sdetails
#300.06 sdetails
#310.06 sdetails
#320.06 sdetails
#330.06 sdetails
#340.06 sdetails
#350.06 sdetails
#360.06 sdetails
#370.06 sdetails
#380.06 sdetails
#390.06 sdetails
#400.06 sdetails
#410.06 sdetails
#420.06 sdetails
#430.06 sdetails
#440.06 sdetails
#450.06 sdetails
#460.06 sdetails
#470.06 sdetails
#480.06 sdetails
#490.06 sdetails
#500.07 sdetails
#510.06 sdetails
#520.06 sdetails
#530.06 sdetails
#540.06 sdetails
#550.06 sdetails
#560.06 sdetails
#570.06 sdetails
#580.06 sdetails
#590.06 sdetails
#600.06 sdetails
#610.06 sdetails
#620.06 sdetails
#630.06 sdetails
#640.06 sdetails
#650.06 sdetails
#660.06 sdetails
#670.06 sdetails
#680.06 sdetails
#690.07 sdetails
#700.07 sdetails
#710.06 sdetails

Code

def main():
    n, q = map(int, input().split())

    forest = [list(map(str, input())) for _ in range(n)]
    commands = [list(map(int, input().split())) for _ in range(q)]
    for i in range(n):
        for j in range(n):
            if forest[i][j] == "*":
                forest[i][j] = 1
            else:
                forest[i][j] = 0
    prefix = [[0]*(n+1) for _ in range(n+1)]
    for i in range(1, n + 1):
        for j in range(1, n + 1):
            prefix[i][j] = prefix[i][j - 1] + prefix[i - 1][j] + forest[i - 1][j - 1] - prefix[i - 1][j - 1]


    for command in commands:
        y1, x1, y2, x2 = command
        res = prefix[y2][x2] - prefix[y2][x1-1] - prefix[y1-1][x2] + prefix[y1-1][x1-1]
        print(res)




if __name__ == "__main__":
    main()

Test details

Test 1

Verdict:

input
1
gl

correct output
gl

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 2

Verdict:

input
2
adedf
ff

correct output
adedfff

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 3

Verdict:

input
2
jb
lj

correct output
jblj

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 4

Verdict:

input
2
qlipb
sr

correct output
qlipbsr

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 5

Verdict:

input
3
f
llk
onfj

correct output
fllkonfj

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 6

Verdict:

input
3
jaeo
mob
nk

correct output
jaeomobnk

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 7

Verdict:

input
3
nemlo
psqhy
sg

correct output
nemlopsqhysg

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 8

Verdict:

input
4
dia
eh
fbcae
gf

correct output
diaehfbcaegf

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 9

Verdict:

input
4
c
cbfaa
egbg
fc

correct output
cbfaacegbgfc

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 10

Verdict:

input
4
cbc
cdd
ceed
dbeea

correct output
cbccddceeddbeea

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 11

Verdict:

input
4
bfec
bgbaf
fcg
fdbbg

correct output
bfecbgbaffcgfdbbg

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 12

Verdict:

input
5
aoefh
ge
imgjj
kmj
...

correct output
aoefhgeimgjjkmjmhhi

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 13

Verdict:

input
5
bcbec
ei
fdigc
ilabd
...

correct output
bcbeceifdigcilabdlg

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 14

Verdict:

input
5
a
d
db
glfff
...

correct output
adbdglfffih

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 15

Verdict:

input
5
ab
d
ebhin
k
...

correct output
abdebhinknab

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 16

Verdict:

input
5
fasgx
o
oezws
qua
...

correct output
fasgxoezwsoquaspfd

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 17

Verdict:

input
5
bcggd
dcg
e
fc
...

correct output
bcggddcgefcg

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 18

Verdict:

input
5
cmo
cx
hftbb
mil
...

correct output
cmocxhftbbmiltksr

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 19

Verdict:

input
5
ab
ababa
b
ca
...

correct output
ababaabbcaccb

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 20

Verdict:

input
5
o
rjj
sfj
ti
...

correct output
orjjsfjtiw

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 21

Verdict:

input
5
a
aa
aaa
abbab
...

correct output
aaaaaaabbabba

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 22

Verdict:

input
10
aoefh
f
ge
hlmgh
...

correct output
aoefhfgehlmghimgjjjkmjmhhinmol...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 23

Verdict:

input
10
bcbec
cjjil
dbigk
ei
...

correct output
bcbeccjjildbigkeifdigcgfbikfil...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 24

Verdict:

input
10
a
cij
d
db
...

correct output
acijdbddhhekcgibfgglfffihkg

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 25

Verdict:

input
10
ab
d
ebhin
fk
...

correct output
abdebhinfkgjdinaiodgkacknab

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 26

Verdict:

input
10
buywl
fasgx
gb
jzpek
...

correct output
buywlfasgxgbjzpekoezwsoquaspfd...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 27

Verdict:

input
10
acg
bcggd
dcg
dede
...

correct output
acgbcggddcgdedeefcfdbbfgabbg

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 28

Verdict:

input
10
cmo
cx
dpr
dtir
...

correct output
cmocxdprdtirhftbbmfmiltksrttkb...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 29

Verdict:

input
10
ab
ababa
abbc
b
...

correct output
ababaababbcbbbcaccbcccccc

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 30

Verdict:

input
10
dmq
gl
j
jqso
...

correct output
dmqgljjqsoorjjsfjtiulvw

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 31

Verdict:

input
10
a
aa
aaa
abbab
...

correct output
aaaaaaabbabbabbabbabbbbbabbbbb

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 32

Verdict:

input
100
aa
acmfac
afmolcn
alllbndbli
...

correct output
aaacmfacafmolcnalllbndbliamdal...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 33

Verdict:

input
100
a
acjgj
ae
aegdb
...

correct output
aacjgjaeaegdbafcbahledfchagaja...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 34

Verdict:

input
100
a
aah
abaeeaifc
abajl
...

correct output
aaahabaeeaifcabajlaehaejcdegka...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 35

Verdict:

input
100
a
aa
abg
abndfmmmk
...

correct output
aaaabgabndfmmmkacggjdeacogeada...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 36

Verdict:

input
100
afn
aic
ajrkgzldb
amcyqyh
...

correct output
afnaicajrkgzldbamcyqyhandanxhj...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 37

Verdict:

input
100
aacdeffdd
abaacbae
abfbbff
ac
...

correct output
aacdeffddabaacbaeabfbbffacacbg...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 38

Verdict:

input
100
abnfxhutgk
ajkdoqmdqp
asxeblm
badpwpsqhn
...

correct output
abnfxhutgkajkdoqmdqpasxeblmbad...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 39

Verdict:

input
100
a
aa
aaaaacaca
aaaabcabc
...

correct output
aaaaaaaacacaaaaabcabcaaabaaaab...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 40

Verdict:

input
100
a
aiesfhkro
aivvkdc
ajrtj
...

correct output
aaiesfhkroaivvkdcajrtjaqfnivlb...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 41

Verdict:

input
100
a
aa
aaaa
aaaaa
...

correct output
aaaaaaaaaaaaaaaaaaaaaaaaaaabab...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 42

Verdict:

input
200
a
aa
abbhjifdb
acmfac
...

correct output
aaaabbhjifdbacmfacadiadnhkaehh...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 43

Verdict:

input
200
a
aa
abihiahg
acjgj
...

correct output
aaaabihiahgacjgjadaeaegdbafcba...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 44

Verdict:

input
200
a
aah
abaeeaifc
abajl
...

correct output
aaahabaeeaifcabajlaehaejcdegka...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 45

Verdict:

input
200
a
aa
aan
abg
...

correct output
aaaaanabgabndfmmmkacggjdeacoge...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 46

Verdict:

input
200
ad
aegewtfc
afn
aic
...

correct output
adaegewtfcafnaicajrkgzldbamcyq...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 47

Verdict:

input
200
a
aa
aacdeffdd
aaeceaeb
...

correct output
aaaaacdeffddaaeceaebabaacbaeab...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 48

Verdict:

input
200
abnfxhutgk
aghv
ajkdoqmdqp
ajpvvalnu
...

correct output
abnfxhutgkaghvajkdoqmdqpajpvva...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 49

Verdict:

input
200
a
aa
aaaaacaca
aaaabcabc
...

correct output
aaaaaaaacacaaaaabcabcaaaacbcaa...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 50

Verdict:

input
200
a
abam
aiesfhkro
aivvkdc
...

correct output
aabamaiesfhkroaivvkdcajrtjakam...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 51

Verdict:

input
200
a
aaicd
acbjfaj
achddjj
...

correct output
aaaicdacbjfajachddjjacifadaecf...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 52

Verdict:

input
1000
a
aa
aaccbkcd
aaj
...

correct output
aaaaaccbkcdaajaanabaabanikjabb...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 53

Verdict:

input
1000
a
aa
aabecajcf
aabg
...

correct output
aaaaabecajcfaabgaabjllgdlkaadg...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 54

Verdict:

input
1000
a
aa
aablaga
aah
...

correct output
aaaaablagaaahaajaaklkjjababaee...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 55

Verdict:

input
1000
a
aa
aagjd
aajdlmacjn
...

correct output
aaaaagjdaajdlmacjnaakjdngdfaal...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 56

Verdict:

input
1000
a
aalguz
abcce
abggxup
...

correct output
aaalguzabcceabggxupabujabxldxy...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 57

Verdict:

input
1000
a
aa
aaabaaaaf
aaaeb
...

correct output
aaaaaabaaaafaaaebaabeadaabfffd...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 58

Verdict:

input
1000
a
aamuthxggq
abnfxhutgk
adaumgqm
...

correct output
aaamuthxggqabnfxhutgkadaumgqma...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 59

Verdict:

input
1000
a
aa
aaa
aaaa
...

correct output
aaaaaaaaaaaaaaaaaaaaaaaaaaabaa...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 60

Verdict:

input
1000
a
aanmhqqnpc
ab
abam
...

correct output
aaanmhqqnpcababamabginwqvvacba...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 61

Verdict:

input
1000
a
aa
aaaca
aae
...

correct output
aaaaaacaaaeaaekcaagjeahdaahhdf...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 62

Verdict:

input
100000
a
aa
aaa
aaaagle
...

correct output
aaaaaaaaaagleaaabaaabiaaaaccgh...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 63

Verdict:

input
100000
a
aa
aaa
aaaagf
...

correct output
aaaaaaaaaagfaaaaihlblgaaaalkll...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 64

Verdict:

input
100000
a
aa
aaa
aaaa
...

correct output
aaaaaaaaaaaaaabkaaaaelbjbaaaaf...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 65

Verdict:

input
100000
a
aa
aaa
aaaa
...

correct output
aaaaaaaaaaaaaahleaaaajaaabaaab...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 66

Verdict:

input
100000
a
aa
aaa
aaacxrqz
...

correct output
aaaaaaaaacxrqzaaahaaaahaaaplto...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 67

Verdict:

input
100000
a
aa
aaa
aaaa
...

correct output
aaaaaaaaaaaaaaaaaaaaaadbaaaaaa...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 68

Verdict:

input
100000
a
aa
aaa
aaail
...

correct output
aaaaaaaaailaaaitehaeaaaitxaaam...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 69

Verdict:

input
100000
a
aa
aaa
aaaa
...

correct output
aaaaaaaaaaaaaaabghaaaabcaffaaa...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 70

Verdict:

input
100000
a
aa
aaa
aaaaggo
...

correct output
aaaaaaaaaaggoaaacwpgjkvaaaftbl...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)

Test 71

Verdict:

input
100000
a
aa
aaa
aaaa
...

correct output
aaaaaaaaaaaaaabaaaagkaaabaaabb...

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 27, in <module>
    main()
  File "input/code.py", line 2, in main
    n, q = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)