Ticket 3563
Problem 1629 -d
View hacks & all small testcases

Unable to dry run this testcase?
Try making a new request with small values of n_high, t_high, *_high, etc.


Retry
Input
1
230
bc
f
h
i
ib
ag
e
ebb
i
hg
d
edc
ic
eii
af
ba
ae
dcf
ff
a
de
i
h
fgf
eai
d
fi
cf
h
cci
ib
ge
fed
bgb
ch
f
d
hb
a
e
b
hdc
ge
i
igi
gg
ae
hf
hhb
c
ah
g
fh
abd
ef
cic
af
h
b
db
ccd
cd
e
c
bef
bge
ah
bh
eib
he
ci
hd
ieh
b
db
ff
cc
hfc
ed
e
c
f
a
iaf
i
d
i
db
ie
ih
ff
db
da
fb
e
bhg
a
d
g
h
e
be
ib
d
eac
eia
if
bha
ddh
gbb
a
edf
ca
ca
bh
b
gi
ifg
ddf
d
ii
b
f
g
ei
h
fec
ag
c
fd
cd
f
c
bah
ig
aac
ahf
a
dia
c
c
h
c
ch
dde
fh
heg
cf
h
h
aad
ha
ba
g
ee
acf
gdf
bd
f
bih
dbi
d
bi
ehe
i
f
ddb
ed
cd
hg
f
a
iff
f
a
ghf
f
gbe
bfh
a
e
dge
ae
d
b
fd
gge
c
fh
dha
ib
ieh
gi
g
hai
eeb
dfb
e
ce
be
cdb
e
c
gb
a
ic
gdi
i
i
bbh
b
fe
e
d
bb
d
ieb
c
dea
hgg
agf
g
eh
i
hff
g
he
idg
cid
ied
Expected Output
YES
Generator Parameters
--alpha_size_cap 26 --alpha_size_high 9 --alpha_size_low 1 --n_cap 200000 --n_high 230 --n_low 230 --t_cap 100 --t_high 1 --t_low 1