Back
Close

Shakespeare in the Park

Statement
The bard has hidden his message in an NxN field of characters. The first character of the message is at position (x,y), where (0,0) is the upper left corner. If the ASCII code of the character is ABC (digits A, B, C), then the next character is at (x+AB,y+C) modulo N.

Input description
<<Line 1:>> The starting [[x]] position. <<Line 2:>> The starting [[y]] position. <<Line 3:>> The size [[N]] of the field. <<Next [[N]] lines:>> The field values.

Output description
One line with the bard's message. <<The message ends with either a period (.) or a question (?) mark.>>

Constraints
10 ≤ [[N]] ≤ 40

Game modes

Test cases
Test 1 Test
Input
10 11 19 x XI E`fF^Vtfxx<!^w ts4Nm8o;-]6bOk#1gF> I5+` HMn634*I6onG`o hIphV7n3FhtQ]>p?;.+ ;[B%^M#ZbRe\HDfeZ2; rs2 Sp*l7^aRKUZ*_eA (=UhWO*Jpph6V@cC?cl oqled4i^_,Qhl)IL$ng [-ye`i+ltqr-1,&^)?& ie XDlo3JuOX3R:'"O3 # m)P_J,#:/:teoZ1/v XTam t;\A,T3f,[qU4; 9iZW1[LrLw=v>2.(s t OMXKTdTqNRT,G/Mc;eL aoWpWx%FC5V2:;,y&1J pe@g9"rS4=%ZrH3;h?o >VlCi'&Jm0 =\A`\rvu VT)0R3Z7 O^ygjj[oK1 e-:1-Fpa 5@t=buM E0
Output
To be, or not to be: that is the question.

Validator 1 Validator
Input
20 14 21 0=:4gAXc_36VmcJ$f_"_h -4"Je't,2_KeSQaK=]P<< OBQYGDCrA&4Dt]r_QYpKO 40I:+rn&pkWK>iEj,+bOo Fe@oU?@R0odNT =%MSbR7 eKq`(Q\e3<)oFSF7SlNEu ! XeM9Z/HoUDl9Rao,$& ?A5tqjv,QT:.@>fxtEb(Y ,CR9/H3t:;xoSdi>7&w:O `4po d3^QC"!NQk.:f,3* g7hQvvM-`^`3U=rsCU-ju WxFP7UkWdMS jko&=CU=J TN;3lS`I'7 \J_j\\(rZ l@el3# y=-;1QNR>G/"LT ! ?Ve_Hb5D-FPRR]MUi0R +o43 $p: tCG0b `lbFaF oWShPueof6Ipmj?]bHWnq '*)ayS+:F&*mhp!`-amj' TBtn cR/)d_J_3h](WsI SVQOea$>3b1OWVeH:Pug9 5c<%$co&X6PBb-hjTO\ e
Output
Romeo, Romeo! Wherefore art thou Romeo?

Test 2 Test
Input
3 16 17 I%VyN-vNRvfh1k!0 U$9]r:hG\eCr%K.Ev JpoyTY`$9Z[w,CZ'd c sM<<5G\OlOEfRB/ Qj5T.x4qrF^B7'X][ \Y`.!r 09e$*X&6We naw#gC.bX p&_G&LR ErneOT:>XMKWP#AkW bRc7e80r\$njINv[O ,q2qpC_h/N:eSYDye QUSbTr_4v W_o=xF] =-d[=Y/JwbQ0eE9m, +Z6hjs@.aP0rtDL3V .@=W>8(E5nl(-4" b k?D*O3/w/=u%YWUUa e$W5mvL@9,F+=a?N` g@`B==Vk'nk1;y\!A
Output
Beware the Ides of March.

Validator 2 Validator
Input
3 8 18 h[v7qw37.8l216:7j )87$bQ6Y\-e'"TElSe PctAM^1nU.kBa'q\.8 hAWni^!w6]B#:A*'$x @nH;bKg&]`h&0rs;hy ehyfRy*YL2h,%YrB'p @vL6sH.<G@1Z;YO\"9 hu=Bp "4f,iYn LQKa $.2T6g#6(+Pg=rgUW> l&VOg1;1sinSU:F b6 a+KyW;'Ih1^i23iPW` :@XGd.1\O(L_&&0iB& ?An,4EuHXJKo.evX?t bury jN/j*l:W[PnS Xed0*mQl6^e$r$XqlW 7MQVENZto.wlB&&#CR owtn:=>.&JXHwJ'r4# !DKap9+ed]m[`c-Ow$
Output
To thine own self be true.

Test 3 Test
Input
13 5 16 ijMf udtB]d>n'[ X/E[Yvn>lvkgo3O. ?+o^mo^wob4xsR6l t` kNJ>MF)SC,uop .F%+tPm*Vn,p2yI= @QuZItar+0scRN0g W(e7AUq\a&<9`R41 IYcU]AQ&;S hr<]v OxXK1oIr!s1(+R^( .SE_,i4_.Oj Eiep 'tGrXc@Kr^d4;efe hYiIt5L vn6NLY)E 5s.eG:-hmUT56 5= iW2Ko';r.9o:to0] .c1 Bf4s&/e-kwYw YO2.n4>KF`ev8I8c
Output
Now is the winter of our discontent.

Validator 3 Validator
Input
9 12 20 Q1Z@,BQerB-o$$u:"ULJ Uvt0dfWltt62kuo*) c2 f.ho;ti`X1`uY>ykKJ;F lQx6"7=2F-!7Vk.)1d?= ^M]G[o$3 %'0HFlL0deU FY5F=6o4UJh"k9'ZhbD; 6a`US?46>h mi2$9'k.A CKTNnc4&KA5qkeqkX`co K^ds\','>soUV8rTh\d2 E h2A ,0tHQKcYv#]Ut_ (,Uf*i*Atr`5JO\*SBJD k5n)mlY(=Ja*HkqxPs>R YUD%iv 4=TqR%oY$SA.r yv3gib`BwsjQNdt&#8W9 P<0wcnvb>p;y'L6Bt*P: KeeA_RfNokjhZ.Zjerq? rGucM(ExIaCt#YhrFh)- xK<>DpaH`w3(T9["j3>k q?5s0IOf7yeCNMgio?:d J n4, 4EsiIPM&VhY<GM
Output
The lady doth protest too much, methinks.

Test 4 Test
Input
29 16 38 qB;>9hYf-ERCs:9!LT?N?T0IPhdlmgFPOA4+U< Hk)ZG<m:]'=?LLr d?adf eW!.[BqCB]HjC!b nQi0$X $nrUgd+ ]CX.q_Y/d>t</)OL:Zn/GEZ _^$)[c<'Q2ey<Xd3YQ3?6+[bHco2C o[<j[>hO vMnuZ$_O0aAWL?RyPL2Gri-^$U?bmqkmCU-6Gg TS%,I0xosV0RyjLclQ;i[sxMmew.s)foxfCj"b U3)_ripgT&xUl6MrO,3Kk[iM%t;6aBH1W5a S; 8;Hn@#Cwa%DZ+5INfD2"ANIG*wpEnu,bF%3??T mP[J8xt4r/F`v>3;;J5))"Yl:9Y_tvW 18DCik 3ij;H9,t'3cf!2Da%E<vjjOxZu(Y<tY m]:/^M OkS7[bT@'_\!A^8ars(`g.MK(U!<%gBQ ,pjh5 ) 84kR69>BdVRWLq*hn?wqoOaHb'hdXlI2T6DR Tmck?x#h_akHCS)L\abE[Q'j_OE,QRMox ;i.M t7b'el7&&58,QvP^PC]1:(\cBF[ K[R@?=Z1pt ,iDg6EoT4v#&gWafXnr4U77`)6ap #B\`GNX7H dgZbxa8!hjSs'Nq]D_okaTt@jm:=HpW,p!sXcO Y3O%O3;9.\]QRRkZ]i`bU>8/3FexsTGa\bnn>- lLZM ZjnMYo:2-3RLD pIR%atCs$e[S#YCi:X0 kT&/J8G vJS tZ;v=ft_PrI=Yt3IP.`=kyq:[L #j6&)[6<lGA Wqn@3PKgfh\Day7$8)Po"\>E4r J9ksv1q$ilJ,(IWkl?<(MXHOVx`g]_B",TU#&h elimj;E<=cP:#ooA:PF ;9Vr-X[lcJXDVw%Uw( <F)p>idb->,t26cf>o?V)rp,WfMhq#3KeSC#WK THr^ BrcXF0s!e0wt)#hR!* sxMDG]OeQ\6i4W no7aBhiBSer`X;,!F,`87yyIJBX)g-I3nYP 45 di`lVRvtu(Gg2?(-+8Mr^qXByD-o^u4f$Atl7> i^ : .vq4S1'6infNh$veGviER(nY6+b?b]q2w tvpxS(`I5`RQHe--q)kSLX 5/3B2^u1%y%CU'q 2d?X\[ZoAON$hX#b_irHW$) "*Uw/XC3qw+9ls aP1Y[6i>2hh2dlC!`Z,B&!'MZBJSKee6?]O9Wo la *7DbNY[sYp:v#lM> 8qn,+jdYn'>3o18^r >K%Q2KphkvnxvjEWp2hmY 2jUeAyEWFx qep<y !,VxKa[G-F%Jd*=8]QWbw(@F(.o1TZ,"dBruIo EgM0nj3Oc.&W5"PE,$WL4M yyqt3I3.H!TL?+ \[jd?b7ZieQ06-cY1Y-o#pArCd&.X]IK),FPoF Vb%_#j6nXueOMw=0S,@aKol:1t-6i4+ $rNq4? "GtV_s!sLuWwg5^8)aG=Jn O8K+9RKYFps80Ag U;<=odjlV(6*yiWrWJfDC<aJ.&-v%Bn8X'\F+Q
Output
There are more things in heaven and earth, Horatio, than are dreamt of in your philosophy.

Validator 4 Validator
Input
39 12 40 >h/40*O6q)%L$"6cqtt5^wSi?9k@#i*k T3#VMm# k?-\E$Lp(qfA?Jd:DRfmeG,`uT-p1'!Tb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yv8(!8*%sx: g9/e53[d x[Ed=)P]lA4ZUJ;A@'r1wNbC*gU#t``vJ` HbPls ,<Cu$X#d/*-d""8g:*=s=ehbA`XMrri"X?7B-B0d 2KqFVF4bAN ?MXp<u0nh=5.Y,KBTLdJ89FO3Ifle o9m")ca[odc,H+^P&&o k$B8?`lsyRJ#Bre]IB/) gggackW^9lKw=lJ#<wg+!V^E 5/jq6qGN&_wVQZ) e6:MCLp80Jl5OY>pm0iLi:waR`9dp>9(o8vS)$c` !JjZS3pETg QL`^rqUOaY1)RjD:/p.-AeW07tG9u H\Y;+"YD1:_FvJ;bN!-a'EXn6^ 3Y%j3Eo1E+&Sg 'm56LfuDijjlMs]Cik<*.l7DS\5('T=A3gA_eQR2 NG+b./7Zhk 7GuJBQbrWp+=OMP MY-\ttix9N3t[ `^Xj1Tg[,Iih#"e0\_#AC<#&t6r`e-"!]P(BTBIZ $5>Yt4wc$"S8dx=c2d+6beeba&)p8>#eTG$d(?oO
Output
We are such stuff as dreams are made on, and our little life is rounded with a sleep.

Solution language

Solution

Stub generator input
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants