25 lines
1.2 KiB
Python
25 lines
1.2 KiB
Python
input = """hok:sopkhopgue;du:jeuploahtegrxropcdoyptytkojeoxtekxtekpoapte!rtxkluxkexyoarapokauepuxaltxagokyguakxoktxayukmpux:sohoxawtxkhurkjerugu!uxauqolowpterggopgokyrkaoklokohytrktxxoepkuhokaptekkokvytephopoapte!opoxyupauxalewepoueuggoiatealptracatepxoiuque:socatepxoiuque:socatepxoiulptraocuggoiatealptracyr!taoikep!tekhohocpoxapoiluxkgoyup:cuppr!ougumtxaurxocohypexaoigoguwzprxaso!oqoaugcmtx:oiatealptrau::pteyrkytepoxapopluxkgokatrgoaaokyewgrjeokcuemtxlulptrao!tekapte!opoiexoytpaolokop!r:ojerltxxolrpo:aohoxau::okue;:erkrxoklepokauepuxacgo:tloloxapoookajeupuxaoloe;:rxjeuxaoseralrokocuaaoxartxoxte!puxaguytpaodurytkrartxxoexkouelu:rlokyo:rugohoxarhytpaoleyup:zoggt,katxodekaouelokkeknn:ogukopuralthhuqojeo!tekktzoilrkktekdekaou!uxalohopoapte!opnjeuxlgo:erkrxrop!teklohuxlopu:ojeo!tek!tegoihuxqoplraokgerblok:tpxr:stxkue!rxurqpooaleqtgtewakzcrg!tek:txlerpuauhuauwgon"""
|
|
decal = -4
|
|
|
|
s1="azertyuiop"
|
|
s2="qsdfghjklm"
|
|
s3="wxcvbn,;:!"
|
|
|
|
res = ""
|
|
for c in input:
|
|
if c in s1:
|
|
s = s1
|
|
if c in s2:
|
|
s = s2
|
|
if c in s3:
|
|
s = s3
|
|
|
|
pos = s.find(c) - decal
|
|
if pos < 0:
|
|
pos = pos + len(s)
|
|
if pos > len(s)-1:
|
|
pos = pos - len(s)
|
|
res = res + s[pos]
|
|
|
|
print(res)
|