Submission details
Task:Freight trains
Sender:aalto26em_003
Submission time:2026-09-28 17:52:05 +0300
Language:Python3 (PyPy3)
Status:READY
Result:
Test results
testverdicttime
#10.04 sdetails
#20.04 sdetails
#30.04 sdetails
#40.04 sdetails
#50.04 sdetails
#60.04 sdetails
#70.04 sdetails
#80.04 sdetails
#90.04 sdetails
#100.04 sdetails
#110.04 sdetails
#120.04 sdetails
#130.04 sdetails
#140.04 sdetails
#150.04 sdetails
#160.04 sdetails
#170.04 sdetails
#180.04 sdetails
#190.04 sdetails
#200.04 sdetails
#210.04 sdetails
#220.04 sdetails
#230.04 sdetails
#240.04 sdetails
#250.04 sdetails
#260.04 sdetails
#270.04 sdetails
#280.04 sdetails
#290.04 sdetails
#300.04 sdetails
#310.04 sdetails
#320.04 sdetails
#330.04 sdetails
#340.04 sdetails
#350.04 sdetails
#360.04 sdetails
#370.04 sdetails
#380.04 sdetails
#390.04 sdetails
#400.04 sdetails
#410.04 sdetails
#420.04 sdetails
#430.04 sdetails
#440.04 sdetails
#450.04 sdetails
#460.04 sdetails
#470.04 sdetails
#480.04 sdetails
#490.04 sdetails
#500.04 sdetails
#510.04 sdetails
#520.04 sdetails
#530.04 sdetails
#540.04 sdetails
#550.04 sdetails
#560.04 sdetails
#570.04 sdetails
#580.04 sdetails
#590.04 sdetails
#600.04 sdetails
#610.04 sdetails
#620.04 sdetails
#630.04 sdetails
#640.04 sdetails
#650.04 sdetails
#660.04 sdetails
#670.04 sdetails
#680.04 sdetails
#690.04 sdetails
#700.04 sdetails
#710.04 sdetails

Code

def main():
    n = int(input())
    a = []
    a.sort(key=lambda x: x * 10)
    print("".join(a))


main()

Test details

Test 1

Verdict:

input
1
gl

correct output
gl

user output
(empty)

Test 2

Verdict:

input
2
adedf
ff

correct output
adedfff

user output
(empty)

Test 3

Verdict:

input
2
jb
lj

correct output
jblj

user output
(empty)

Test 4

Verdict:

input
2
qlipb
sr

correct output
qlipbsr

user output
(empty)

Test 5

Verdict:

input
3
f
llk
onfj

correct output
fllkonfj

user output
(empty)

Test 6

Verdict:

input
3
jaeo
mob
nk

correct output
jaeomobnk

user output
(empty)

Test 7

Verdict:

input
3
nemlo
psqhy
sg

correct output
nemlopsqhysg

user output
(empty)

Test 8

Verdict:

input
4
dia
eh
fbcae
gf

correct output
diaehfbcaegf

user output
(empty)

Test 9

Verdict:

input
4
c
cbfaa
egbg
fc

correct output
cbfaacegbgfc

user output
(empty)

Test 10

Verdict:

input
4
cbc
cdd
ceed
dbeea

correct output
cbccddceeddbeea

user output
(empty)

Test 11

Verdict:

input
4
bfec
bgbaf
fcg
fdbbg

correct output
bfecbgbaffcgfdbbg

user output
(empty)

Test 12

Verdict:

input
5
aoefh
ge
imgjj
kmj
...

correct output
aoefhgeimgjjkmjmhhi

user output
(empty)

Test 13

Verdict:

input
5
bcbec
ei
fdigc
ilabd
...

correct output
bcbeceifdigcilabdlg

user output
(empty)

Test 14

Verdict:

input
5
a
d
db
glfff
...

correct output
adbdglfffih

user output
(empty)

Test 15

Verdict:

input
5
ab
d
ebhin
k
...

correct output
abdebhinknab

user output
(empty)

Test 16

Verdict:

input
5
fasgx
o
oezws
qua
...

correct output
fasgxoezwsoquaspfd

user output
(empty)

Test 17

Verdict:

input
5
bcggd
dcg
e
fc
...

correct output
bcggddcgefcg

user output
(empty)

Test 18

Verdict:

input
5
cmo
cx
hftbb
mil
...

correct output
cmocxhftbbmiltksr

user output
(empty)

Test 19

Verdict:

input
5
ab
ababa
b
ca
...

correct output
ababaabbcaccb

user output
(empty)

Test 20

Verdict:

input
5
o
rjj
sfj
ti
...

correct output
orjjsfjtiw

user output
(empty)

Test 21

Verdict:

input
5
a
aa
aaa
abbab
...

correct output
aaaaaaabbabba

user output
(empty)

Test 22

Verdict:

input
10
aoefh
f
ge
hlmgh
...

correct output
aoefhfgehlmghimgjjjkmjmhhinmol...

user output
(empty)

Test 23

Verdict:

input
10
bcbec
cjjil
dbigk
ei
...

correct output
bcbeccjjildbigkeifdigcgfbikfil...

user output
(empty)

Test 24

Verdict:

input
10
a
cij
d
db
...

correct output
acijdbddhhekcgibfgglfffihkg

user output
(empty)

Test 25

Verdict:

input
10
ab
d
ebhin
fk
...

correct output
abdebhinfkgjdinaiodgkacknab

user output
(empty)

Test 26

Verdict:

input
10
buywl
fasgx
gb
jzpek
...

correct output
buywlfasgxgbjzpekoezwsoquaspfd...

user output
(empty)

Test 27

Verdict:

input
10
acg
bcggd
dcg
dede
...

correct output
acgbcggddcgdedeefcfdbbfgabbg

user output
(empty)

Test 28

Verdict:

input
10
cmo
cx
dpr
dtir
...

correct output
cmocxdprdtirhftbbmfmiltksrttkb...

user output
(empty)

Test 29

Verdict:

input
10
ab
ababa
abbc
b
...

correct output
ababaababbcbbbcaccbcccccc

user output
(empty)

Test 30

Verdict:

input
10
dmq
gl
j
jqso
...

correct output
dmqgljjqsoorjjsfjtiulvw

user output
(empty)

Test 31

Verdict:

input
10
a
aa
aaa
abbab
...

correct output
aaaaaaabbabbabbabbabbbbbabbbbb

user output
(empty)

Test 32

Verdict:

input
100
aa
acmfac
afmolcn
alllbndbli
...

correct output
aaacmfacafmolcnalllbndbliamdal...

user output
(empty)

Test 33

Verdict:

input
100
a
acjgj
ae
aegdb
...

correct output
aacjgjaeaegdbafcbahledfchagaja...

user output
(empty)

Test 34

Verdict:

input
100
a
aah
abaeeaifc
abajl
...

correct output
aaahabaeeaifcabajlaehaejcdegka...

user output
(empty)

Test 35

Verdict:

input
100
a
aa
abg
abndfmmmk
...

correct output
aaaabgabndfmmmkacggjdeacogeada...

user output
(empty)

Test 36

Verdict:

input
100
afn
aic
ajrkgzldb
amcyqyh
...

correct output
afnaicajrkgzldbamcyqyhandanxhj...

user output
(empty)

Test 37

Verdict:

input
100
aacdeffdd
abaacbae
abfbbff
ac
...

correct output
aacdeffddabaacbaeabfbbffacacbg...

user output
(empty)

Test 38

Verdict:

input
100
abnfxhutgk
ajkdoqmdqp
asxeblm
badpwpsqhn
...

correct output
abnfxhutgkajkdoqmdqpasxeblmbad...

user output
(empty)

Test 39

Verdict:

input
100
a
aa
aaaaacaca
aaaabcabc
...

correct output
aaaaaaaacacaaaaabcabcaaabaaaab...

user output
(empty)

Test 40

Verdict:

input
100
a
aiesfhkro
aivvkdc
ajrtj
...

correct output
aaiesfhkroaivvkdcajrtjaqfnivlb...

user output
(empty)

Test 41

Verdict:

input
100
a
aa
aaaa
aaaaa
...

correct output
aaaaaaaaaaaaaaaaaaaaaaaaaaabab...

user output
(empty)

Test 42

Verdict:

input
200
a
aa
abbhjifdb
acmfac
...

correct output
aaaabbhjifdbacmfacadiadnhkaehh...

user output
(empty)

Test 43

Verdict:

input
200
a
aa
abihiahg
acjgj
...

correct output
aaaabihiahgacjgjadaeaegdbafcba...

user output
(empty)

Test 44

Verdict:

input
200
a
aah
abaeeaifc
abajl
...

correct output
aaahabaeeaifcabajlaehaejcdegka...

user output
(empty)

Test 45

Verdict:

input
200
a
aa
aan
abg
...

correct output
aaaaanabgabndfmmmkacggjdeacoge...

user output
(empty)

Test 46

Verdict:

input
200
ad
aegewtfc
afn
aic
...

correct output
adaegewtfcafnaicajrkgzldbamcyq...

user output
(empty)

Test 47

Verdict:

input
200
a
aa
aacdeffdd
aaeceaeb
...

correct output
aaaaacdeffddaaeceaebabaacbaeab...

user output
(empty)

Test 48

Verdict:

input
200
abnfxhutgk
aghv
ajkdoqmdqp
ajpvvalnu
...

correct output
abnfxhutgkaghvajkdoqmdqpajpvva...

user output
(empty)

Test 49

Verdict:

input
200
a
aa
aaaaacaca
aaaabcabc
...

correct output
aaaaaaaacacaaaaabcabcaaaacbcaa...

user output
(empty)

Test 50

Verdict:

input
200
a
abam
aiesfhkro
aivvkdc
...

correct output
aabamaiesfhkroaivvkdcajrtjakam...

user output
(empty)

Test 51

Verdict:

input
200
a
aaicd
acbjfaj
achddjj
...

correct output
aaaicdacbjfajachddjjacifadaecf...

user output
(empty)

Test 52

Verdict:

input
1000
a
aa
aaccbkcd
aaj
...

correct output
aaaaaccbkcdaajaanabaabanikjabb...

user output
(empty)

Test 53

Verdict:

input
1000
a
aa
aabecajcf
aabg
...

correct output
aaaaabecajcfaabgaabjllgdlkaadg...

user output
(empty)

Test 54

Verdict:

input
1000
a
aa
aablaga
aah
...

correct output
aaaaablagaaahaajaaklkjjababaee...

user output
(empty)

Test 55

Verdict:

input
1000
a
aa
aagjd
aajdlmacjn
...

correct output
aaaaagjdaajdlmacjnaakjdngdfaal...

user output
(empty)

Test 56

Verdict:

input
1000
a
aalguz
abcce
abggxup
...

correct output
aaalguzabcceabggxupabujabxldxy...

user output
(empty)

Test 57

Verdict:

input
1000
a
aa
aaabaaaaf
aaaeb
...

correct output
aaaaaabaaaafaaaebaabeadaabfffd...

user output
(empty)

Test 58

Verdict:

input
1000
a
aamuthxggq
abnfxhutgk
adaumgqm
...

correct output
aaamuthxggqabnfxhutgkadaumgqma...

user output
(empty)

Test 59

Verdict:

input
1000
a
aa
aaa
aaaa
...

correct output
aaaaaaaaaaaaaaaaaaaaaaaaaaabaa...

user output
(empty)

Test 60

Verdict:

input
1000
a
aanmhqqnpc
ab
abam
...

correct output
aaanmhqqnpcababamabginwqvvacba...

user output
(empty)

Test 61

Verdict:

input
1000
a
aa
aaaca
aae
...

correct output
aaaaaacaaaeaaekcaagjeahdaahhdf...

user output
(empty)

Test 62

Verdict:

input
100000
a
aa
aaa
aaaagle
...

correct output
aaaaaaaaaagleaaabaaabiaaaaccgh...

user output
(empty)

Test 63

Verdict:

input
100000
a
aa
aaa
aaaagf
...

correct output
aaaaaaaaaagfaaaaihlblgaaaalkll...

user output
(empty)

Test 64

Verdict:

input
100000
a
aa
aaa
aaaa
...

correct output
aaaaaaaaaaaaaabkaaaaelbjbaaaaf...

user output
(empty)

Test 65

Verdict:

input
100000
a
aa
aaa
aaaa
...

correct output
aaaaaaaaaaaaaahleaaaajaaabaaab...

user output
(empty)

Test 66

Verdict:

input
100000
a
aa
aaa
aaacxrqz
...

correct output
aaaaaaaaacxrqzaaahaaaahaaaplto...

user output
(empty)

Test 67

Verdict:

input
100000
a
aa
aaa
aaaa
...

correct output
aaaaaaaaaaaaaaaaaaaaaadbaaaaaa...

user output
(empty)

Test 68

Verdict:

input
100000
a
aa
aaa
aaail
...

correct output
aaaaaaaaailaaaitehaeaaaitxaaam...

user output
(empty)

Test 69

Verdict:

input
100000
a
aa
aaa
aaaa
...

correct output
aaaaaaaaaaaaaaabghaaaabcaffaaa...

user output
(empty)

Test 70

Verdict:

input
100000
a
aa
aaa
aaaaggo
...

correct output
aaaaaaaaaaggoaaacwpgjkvaaaftbl...

user output
(empty)

Test 71

Verdict:

input
100000
a
aa
aaa
aaaa
...

correct output
aaaaaaaaaaaaaabaaaagkaaabaaabb...

user output
(empty)