Last year I went to 12 different countries around the world. I made an AI to convert every country that I've visited into a beautiful artwork as a reminder. I input the 12 countries name, then somehow my AI produces the following output:

Hello Mal, You have visited many countries, huh?

So, this is a beautiful art for you:

|-\--\\> |
|o\**--> |
|-X--5*> |
|+*>---> |
|(|**|-> |

Beautiful isn't it?

And to make sure you don't forget, here's the key (sorted):


Actually, the artwork produced is not as expected :/ first, it's not beauty at all! and the last line of the artwork is very strange and looks different from the others.

After finding out how my AI worked, I guess, the odds on the last line was caused by a country that I have visited. Can you guess what is the country? and why does it make an error?

Hint 1

I tried to track its internet history, and I think, my AI didn't visit many websites when processing the artwork, actually, it only visited one page of wikipedia.org

Hint 2

Ah.. finally I remember the name of one of the countries I had visited: Trinidad and Tobago

  • 3
    $\begingroup$ Looking at that particular art style makes me wonder if the computer-puzzle tag might be appropriate.. $\endgroup$
    – Bass
    Dec 3, 2018 at 3:57
  • $\begingroup$ Could you give more hints please? $\endgroup$
    – SDwarfs
    Dec 8, 2018 at 16:31

2 Answers 2


(Firstly, can I just say that this is a really nice little puzzle and it is a shame it has never garnered the attention it deserves!) As for the solution, I believe your AI created this art to represent your travels using:

Minimalist representations of countries’ FLAGS.

To start with, we know from the text that you have visited 12 countries. Note then that the line of the artwork which represents the ‘key’ consists of 12 numbers separated by dashes: 5-5-8-5-8-17-7-7-11-7-11-11. We also know from the hints that:

Trinidad and Tobago was definitely one of the countries visited. Note that ‘Trinidad and Tobago’ is 17 letters long. Since the number 17 appears in the 12-number ‘key’, it would perhaps not be unreasonable to deduce that these numbers represent the lengths of the names of the 12 countries you visited.

So how might this country be represented in the image? Well, notice next that:

If you rotate the image by ninety degrees clockwise you can see a resemblance to a flag on a pole. So perhaps this might be a clue to focus on the flags of the 12 countries you visited.

Returning to the country mentioned in the hint:

The flag of Trinidad and Tobago is a thick black diagonal stripe on a red background (with two very thin white lines dividing the main colours). In a minimalist form, this could be represented by two backslashes: "\ \", indicating the divisions between the red and black sections.

There is one occurrence of the double-backslash in the image, in the second row of symbols. For the minimalist flag approach to work, this must be the part of the image representing Trinidad & Tobago.

So what could the other countries be, and how are they represented in the image? Well, here is one possible way to account for the 11 countries which do not throw the error:

enter image description here (Numbers in brackets indicate the length of the country name.)


- Horizontal dashes can be interpreted as separations between horizontal stripes of colour (in Paraguay, Syria, South Africa, Honduras and Chile), and vertical bar symbols likewise for vertical bands of colour (in Algeria and Chile).
- The circle in the Paraguay flag represents the circular central emblem; the plus sign in the Swiss flag represents the Swiss cross.
- The open bracket in the Algeria flag represents the crescent moon. Asterisks represent stars (the ‘5*’ in Honduras being a shorthand for five stars).
- The solitary saltire cross represents a nation’s flag separated into 4 triangular blocks of colour along the diagonals.
- The two backslashes one above the other can represent the ‘double triangle’ shape of Nepal’s irregular flag.

Obviously there are some potential clashes here:

- The lone star could represent Vietnam, Somalia or Morocco (all 7 letters).
- The solitary saltire cross could represent Jamaica or Burundi (again, both 7 letters).

However, as a result of the order specified in the 'key', I have chosen countries which:

Fit with a pattern of always travelling in an easterly direction to the same or an earlier time zone (passing around the world only once), which could feasibly be a travel itinerary.

This way our key corresponds to: SYRIA (5) – NEPAL (5) – HONDURAS (8) – CHILE (5) – PARAGUAY (8) – TRINIDAD & TOBAGO (17) – MOROCCO (7) – ALGERIA (7) – SWITZERLAND (11) – BURUNDI (7) – SOUTH AFRICA (11) – and one final 11-letter country which throws the error code…

What could the final error-throwing country be? How about:

SAUDI ARABIA - since the country’s flag comprises only white Arabic writing (the Islamic creed, or shahada) above a horizontal sword on a green background and would prove difficult to translate into the ASCII figures required for this artwork. The string of numbers that makes up the 'flagpole' (1-4-5-3-8-15-4-7-7-6-9) could well be something like the lengths of the words in a rough translation of the writing. The fact it makes up the horizontal-lying flagpole could be as a result of the AI attempting to combine this translation with the depiction of the long sword.


Following a comment from @MOehm I revisited the precise countries I had identified to try and:

Use flags of countries whereby the 'flagpole' represented letters taken from particular positions within the other countries' names to create the name of the 12th problematic one (still Saudi Arabia, by the above ASCII-incompatible reasoning).

This produces the following alternative arrangement:

enter image description here
if we can assume that an eleven-letter alternative spelling of 'Guinea-Bissau' has been used in the puzzle...

And the twelfth country can then be derived as follows:

Key (length of country names): 5-5-8-5-8-17-7-7-11-7-11-11
'Flagpole' letter positions of the first 11: 1-4-5-3-8-15-4-7-7-6-9

1/5 Syria
4/5 nepAl
5/8 hondUras
3/5 inDia
8/8 djiboutI
15/17 trinidadandtobAgo
4/7 bahRain
7/7 jamaicA
7/11 guinea-Bissau (if an alternative spelling is used, e.g. using 'Bisau')
6/7 algerIa
9/11 switzerlAnd

which spells out SAUDI ARABIA as before, but as a result of the AI finding an alternative way to represent the difficult-to-convert image of the flag. I find this a much more satisfactory solution, especially since it explains the chevrons using the flag of Bahrain - the only surplus symbols in the image are now those that make up the pole and flag edging.

  • 1
    $\begingroup$ That's impressive! But I think you are missing the importance of the "pole". (When I try to make use of its key position, it doesn't quite work out, though. But I'm probably missing something, too.) $\endgroup$
    – M Oehm
    Aug 20, 2019 at 6:38
  • $\begingroup$ @MOehm Are you perhaps drawing comparison to rot13(gur Fnhqv Nenovna fjbeq)? $\endgroup$
    – Stiv
    Aug 20, 2019 at 6:41
  • 1
    $\begingroup$ rot13(Ab. V guvax gung gur ahzoref bs gur syntcbyr ner vaqvprf vagb gur cerivbhf ryrira pbhagel anzrf. Vg erdhverf bar bs lbhe nygreangvirf naq fbzr er-fbegvat, gubhtu, naq V'z fgvyy zvffvat n O.) $\endgroup$
    – M Oehm
    Aug 20, 2019 at 6:49
  • 1
    $\begingroup$ "Ununun" indeed! :) Well done! $\endgroup$
    – M Oehm
    Aug 20, 2019 at 7:58
  • 1
    $\begingroup$ Wow! that's awesome! actually, I felt this puzzle was too difficult, but I am always impressed with the skill of the puzzlers here. This is the correct answer! and sorry for the misspelled of "Bisau" :) $\endgroup$
    – malioboro
    Aug 21, 2019 at 0:40

I believe the answer to be:

São Tomé and Príncipe


It is the only country in Wikipedia's List of Sovereign States whose title/URL contains characters not contained in ASCII format (those being 'ã', 'é', and 'í'). Since you're working in ASCII art, if you were trying to do operations with the characters in the titles/URLs of each country to make your art, it could fail depending on your language. In C# and Java (among others), any character with a value over 127 will return the character ''.

  • $\begingroup$ +1 yes it's (gnyxvat nobhg NFPVV ohg, vg'f abg gue vagraqrq nafjre, lbh arrq gb svaq bhg ubj gur negjbex vf znqr) $\endgroup$
    – malioboro
    Dec 7, 2018 at 3:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.