Time to blow off some steam — whose name has been hidden in here?
The person we were looking for is CBABBAGE — i.e. Charles Babbage1 — the English mathematician, philosopher, inventor and mechanical engineer who is credited with inventing the first mechanical computer that eventually led to more complex electronic designs.
All of the letters in CBABBAGE represent notes of the musical scale (A–G) and the symbols that appear in the puzzle show how to play these notes on a four-hole ocarina — as hinted by the word "blow" in the first sentence.
The following diagram illustrates this system of notation. Below each note is its representation as an uppercase letter. Below that is another representation consisting of a large circle enclosing a group of four smaller circles — two at the top and two at the bottom. The large circle represents an ocarina. The smaller circles represent the four holes in the ocarina. Small circles filled in black represent covered holes and small circles filled in white represent uncovered holes.
We use an asterisk (*) to represent a covered hole of an ocarina and the letter o to represent an uncovered hole. According to the notation system for playing musical notes on a four-hole ocarina, the following groups of four characters (two at the top and two at the bottom) correspond to the uppercase letters A–G:
** *o ** *o oo oo o* oo ** ** *o *o ** *o oo oo C D E F G A B C
The word CBABBAGE could then be represented by concatenating the groups of four characters (two at the top and two at the bottom) that correspond to its uppercase letters:
**o*ooo*o*oooo** **oo*ooooo*o***o C B A B B A G E
Two lines that should each consist of $$n$$ letters o and asterisks (*), where $$n$$ is even.
The word (in uppercase) represented by the two lines of input according to the notation system for playing musical notes on a four-hole ocarina.
If a group of four characters (two at the top and two at the bottom) does not represent a musical note, a question mark (?) must be inserted at that position of the word instead of a corresponding uppercase letter.
If at least one of the following conditions does not hold for the two lines of input
the two lines are the same length
each line has an even number of characters
each line only consists of letters o and asterisks (*)
then the lines cannot be converted to a word and the output should spell MYSTERY GUEST instead.
Input:
**o*ooo*o*oooo**
**oo*ooooo*o***o
Output:
CBABBAGE
Input:
oo*ooooo*oo****ooo****
*o***oo*oo***ooo*o***o
Output:
ADA???E?ACE
Input:
oo*o******oo*o*oooo*
*oooX****oo*ooX**o*o***
Output:
MYSTERY GUEST
Charles Babbage's close associate Ada Lovelace2 famously wrote technical notes3 entitled "Note A", "Note B", …, "Note G", whose names mirror the seven notes of the musical scale.
Following the system of notation shown in the diagram above, her first name – ADA – would be encoded as
oo*ooo *o***o