24 lines
1.1 KiB
Python
24 lines
1.1 KiB
Python
message = "GwboOBynaABlnNecCigGdd"
|
|
message = "MzZfiIFmMpPizwWZkbByYKfFjJkKusSbBUplLqisSlLdDIQPnrRnuUuUsgkKfFdDGSxhHmMmMXgGjaAJpzZpeEPPnNpncmMinNIwpPWfFcCCNPnqQxXNeqQhHraefFEdkKDpmMPARaqQqQikjJKmMoOIrRpPoOnNmyYMfFxXkoOsSKzZwefFEWvV yYyYjJpPEviIzeExXZxgGwWjkKJXmMxXVvVkqQoOagxXGeEAoOpPtTntTNnNKjtTxXwWgGJunjJdDoONUspPSutTtgGTUhHqlLrRQmuUjJnwfFWNxXpzZPyYlLzZMoOnweEfFWkwpPjJWnNxXKyYjJyYfFuUicbBCcCpuUoOPoeEoOsgwWsaAsSSjJGkKeEnNSpPvVsmyYMoOsSSOxXdyqQzZmMmMYnNDd"
|
|
|
|
found = False
|
|
at_least_one = True
|
|
res = ""
|
|
while at_least_one:
|
|
at_least_one = False
|
|
for i in range(len(message)):
|
|
if found:
|
|
#this is the upper case letter, the 2nd letter
|
|
found = False
|
|
elif i<len(message)-1 and message[i].islower() and message[i].upper() == message[i+1] and not found:
|
|
#this is the mower case letter followed by the same letter in upper case
|
|
found = True
|
|
at_least_one = True
|
|
elif not found:
|
|
res = res + message[i]
|
|
else:
|
|
found = False
|
|
print(res)
|
|
message = res
|
|
res = ""
|