What word is hidden in this block tower?

puzzel
What word is hidden in this block tower?

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
Start with the uppercase letters in alphabetic order and give the vowels a red color.

Cut the alphabet after each letter that appears in the hidden word.

alfabet
Cut the alphabet after each letter that appears in the hidden word.

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

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

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
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).

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:

Determine these two data structures for the block tower corresponding 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