Question 1: Behind the scenes 

$dict = {
    1 => [ 'A', 'B', 'C', 'D' ... ]
    2 => [ 'AD', 'AH', 'AM', 'AN', 'AS' ... ],
    3 => [ 'ACE', 'ACT', 'ADD', 'ADO', 'ADS' ... ],
    4 => [ 'ABED', 'ABET', 'ABLE', 'ABLY' ... ],
    5 => [ 'ABACI', 'ABACK', 'ABAFT', 'ABASE' ... ],
    6 => [ 'ABACUS', 'ABASED', 'ABASES' ... ],
    ...
    22 => [ 'COUNTERREVOLUTIONARIES', ... ],
};