Solve problem "The most frequent word" online - Learn Python 3 - Snakify

Problem «The most frequent word» (Easy)


Statement

Given the text: the first line contains the number of lines, then given the lines of words. Print the word in the text that occurs most often. If there are many such words, print the one that is less in the alphabetical order.


In all the problems input the data using input() and print the result using print().



Saved solutions

Tests

Input Correct answer Result
1
apple orange banana banana orange
banana
3
q w e r t y u i o p
a s d f g h j k l
z x c v b n m
a
3
vqcg vqcg vqcg vqcg vqcg vqcg vqcg
vqcg vqcg
vqcg
vqcg
2
taia ikm ikm ikm taia taia taia
ikm ikm ikm
ikm
1
zc gdwbsv uwsz j bqz cytzpsdpl q zczwrq e zvnisf cytzpsdpl gdwbsv cytzpsdpl e bqz bqz zczwrq gdwbsv gdwbsv e
gdwbsv
3
iawkvxlhqwjm rwcahhaesy kbfahrmup huq w rzllq pq ufszcjb
wmjdbhcwhxzlhlf
jeeyfhbsauapwnpmskgh rzllq rzllq wmjdbhcwhxzlhlf rzllq rzllq jeeyfhbsauapwnpmskgh wmjdbhcwhxzlhlf rzllq jeeyfhbsauapwnpmskgh jeeyfhbsauapwnpmskgh
rzllq
1
enagtgufzhnmyzkf kaphgquvoanw tkvj sylaejugfsv vuszbsdsv kmyyed rnhcdrpx b ejqa vykiu fjmdqlgxmameddhiytv yy owmldhdcjnoi durqhg ftjnehww aq ou tqxlcnxdpnmo ssdhbcdzzp twjdcvcojgtj
aq
10
Death there mirth way the noisy merit. Piqued shy spring nor six though mutual living ask extent. Replying of dashwood advanced ladyship smallest disposal or. Attempt offices own improve now see. Called person are around county talked her esteem. Those fully these way nay thing seems.
At distant inhabit amongst by. Appetite welcomed interest the goodness boy not. Estimable education for disposing pronounce her. John size good gay plan sent old roof own. Inquietude saw understood his friendship frequently yet. Nature his marked ham wished.
Marianne or husbands if at stronger ye. Considered is as middletons uncommonly. Promotion perfectly ye consisted so. His chatty dining for effect ladies active. Equally journey wishing not several behaved chapter she two sir. Deficient procuring favourite extensive you two. Yet diminution she impossible understood age.
So if on advanced addition absolute received replying throwing he. Delighted consisted newspaper of unfeeling as neglected so. Tell size come hard mrs and four fond are. Of in commanded earnestly resources it. At quitting in strictly up wandered of relation answered felicity. Side need at in what dear ever upon if. Same down want joy neat ask pain help she. Alone three stuff use law walls fat asked. Near do that he help.
Betrayed cheerful declared end and. Questions we additions is extremely incommode. Next half add call them eat face. Age lived smile six defer bed their few. Had admitting concluded too behaviour him she. Of death to or to being other.
Consulted he eagerness unfeeling deficient existence of. Calling nothing end fertile for venture way boy. Esteem spirit temper too say adieus who direct esteem. It esteems luckily mr or picture placing drawing no. Apartments frequently or motionless on reasonable projecting expression. Way mrs end gave tall walk fact bed.
Offered say visited elderly and. Waited period are played family man formed. He ye body or made on pain part meet. You one delay nor begin our folly abode. By disposed replying mr me unpacked no. As moonlight of my resolving unwilling.
Folly words widow one downs few age every seven. If miss part by fact he park just shew. Discovered had get considered projection who favourable. Necessary up knowledge it tolerably. Unwilling departure education is be dashwoods or an. Use off agreeable law unwilling sir deficient curiosity instantly. Easy mind life fact with see has bore ten. Parish any chatty can elinor direct for former. Up as meant widow equal an share least.
With my them if up many. Lain week nay she them her she. Extremity so attending objection as engrossed gentleman something. Instantly gentleman contained belonging exquisite now direction she ham. West room at sent if year. Numerous indulged distance old law you. Total state as merit court green decay he. Steepest sex bachelor the may delicate its yourself. As he instantly on discovery concluded to. Open draw far pure miss felt say yet few sigh.
Out too the been like hard off. Improve enquire welcome own beloved matters her. As insipidity so mr unsatiable increasing attachment motionless cultivated. Addition mr husbands unpacked occasion he oh. Is unsatiable if projecting boisterous insensible. It recommend be resolving pretended middleton.
or