What word is hidden in this block tower?

puzzel
Welk woord zit verborgen in deze blokkentoren?

The hidden word is ALUMINIUM. The block tower of this puzzle is constructed as follows. Start with the uppercase letters in alphabetic order and give the vowels a red color.

alfabet
We starten met de opeenvolgende letters van het alfabet, waarbij we de klinkers een rode kleur geven.

Then cut the alphabet after each letter that appears in the hidden word.

alfabet
Daarna knippen we het alfabet doormidden na elke letter die voorkomt in het verborgen woord.

In this case we cut after the letters A, I, L, M, N and U, leaving the following fragments.

alfabet
In dit geval knippen we dus na de letters B, D, E, L, O, R en V, waardoor we de volgende fragmenten overhouden.

Now use these fragments to construct a block tower by stacking the fragments from the shortest (top) to the longest (bottom). Fragments having the same length are stacked in alphabetical order (from top to bottom).

puzzel
Met deze fragmenten maken we nu een blokkentoren waarbij de fragmenten van kort (boven) naar lang (onder) op elkaar gestapeld worden. Fragmenten die even lang zijn worden in alfabetische volgorde gestapeld (van boven naar onder).

As a last step, the letters are removed from the block tower and the puzzle is ready to be solved.

Assignment

A block tower from the above puzzle can be described by the following two data structures:

You are asked to determine these two data structures for the block tower that corresponds to a given hidden word. This is done in the following way:

Example

>>> letters('ALUMINIUM')
['A', 'I', 'L', 'M', 'N', 'U']

>>> fragments('ALUMINIUM')
['A', 'BCDEFGHI', 'JKL', 'M', 'N', 'OPQRSTU', 'VWXYZ']

>>> tower = block_tower('ALUMINIUM')
>>> tower
('A', 'M', 'N', 'JKL', 'VWXYZ', 'OPQRSTU', 'BCDEFGHI')

>>> row_lengths(tower)
(1, 1, 1, 3, 5, 7, 8)

>>> vowel_positions(tower)
{(0, 0), (6, 7), (5, 6), (6, 3), (5, 0)}

Resources