+'INA', 'AAA', 'IAN', 'INA', 'AAN', 'AIA', 'IAI', 'AIN',
+'AAI', 'AAI', 'AII', 'AIA', 'AAA', 'IAA', 'INN', 'AAI',
+'AAA', 'NNI', 'AIN', 'ANI', 'NAA', 'NNN', 'NMA', 'NAA',
+'NIA', 'NMN', 'NNA', 'NNA', 'NNN', 'AMM', 'NNN', 'NAN',
+'IMA', 'AIN', 'NIA', 'AMN', 'NAM', 'IAN', 'NAA', 'NIN',
+'AMM', 'MIA', 'AMA', 'MMI', 'MAA', 'MMA', 'MMA', 'MAA',
+'AMA', 'AMA', 'AAM', 'AAA', 'AMA', 'MAA', 'AAM', 'AMA',
+'AIM', 'MMM', 'MMM', 'AMA'
+#lined message—in case lines are significant
+messageline01 = ("IN AAAAIAN INAAANAIA IA IAINA AI AA IAIIA IAA AAIAAINN AA IAAANN IAINANI")
+messageline02 = ("NA ANNNNMA NAANIANMN NN ANNAN NN AM MNNNN ANI MAAINNIA AM NNAMIA NNAANIN")
+messageline03 = ("AM MMIAAMA MMIMAAMMA MM AMAAA MA AM AAAMA AAA MAMAAAAM AM AAIMMM MMMMAMA")
+print("\n===========================================================")
+print("OPTION01 —MORSE")
+print("===========================================================\n")
+ #take 3 letters at a time and convert to morse
+ #join 3 morse letters together to create braille letter
+ brailleletter = (morse[section[0]]+morse[section[1]]+morse[section[2]])
+ print((list(braille.keys())[list(braille.values()).index(brailleletter)]),end="")
+ #if it doesn't exist, print '?'
+print("\n\n===========================================================\n")
+print("\n===========================================================")
+print("OPTION02 —ALT MORSE")
+print("===========================================================\n")
+ #take 3 letters at a time and convert to morse
+ #join 3 morse letters together to create braille letter
+ altbrailleletter = (altmorse[section[0]]+altmorse[section[1]]+altmorse[section[2]])
+ print((list(braille.keys())[list(braille.values()).index(altbrailleletter)]),end="")
+ #if it doesn't exist, print '?'
+print("\n\n===========================================================\n")
+#try building vertically
+print("\n===========================================================")
+print("OPTION03 —VERTICAL READING")
+print("===========================================================\n")
+for index in enumerate(messageline01):
+ #print("index --> ",index[0])
+ #take letters at a time from each line and group in threes
+ brailleletter = (messageline01[index[0]]+messageline02[index[0]]+messageline03[index[0]])
+ #print(brailleletter, end=" ")
+ vertmessage.append(brailleletter)
+print("vertical message = ",vertmessage)
+print("\n===========================================================")
+print("VERTICAL MESSAGE DECODING:")
+print("===========================================================\n")
+for section in vertmessage:
+ #take 3 letters at a time and convert to morse
+ #join 3 morse letters together to create braille letter
+ #if the 'section' consists of 3 spaces, then interpret it s a single space between words'
+ #yes. I know this is a bit clunky but it doesn't need regex!
+ # 'section' wasn't a triple space, so look it up as a braille letter...
+ # using the previous method
+ brailleletter = (morse[section[0]]+morse[section[1]]+morse[section[2]])
+ #if it exists, add it to the esperanto string
+ esperanto += (list(braille.keys())[list(braille.values()).index(brailleletter)])
+ #if it doesn't exist, print '?'
+# print the constructed esperanto string
+print("\n===========================================================\n")