Eilonwy LDI Number

The Eilonwy LDI Number is a type of LDI created by Princess Eilonwy in 2008. Every time a character is a friend of Princess Eilonwy, the number is assigned to a friend.

Format
The format for Eilonwy LDI Number is ELW &#00000000@, where:
 * ELW is the prefix.
 * & indicates the gender of the character's friend.
 * When a specified friend is a male, & returns M; if it is a female, & returns F.
 * # is century of creation.
 * Characters created in the 18th century are assigned with A.
 * Characters created in the 19th century are assigned with B.
 * Characters created in the 20th century are assigned with C.
 * Characters created in the 21st century are assigned with D.
 * Characters created at unknown century are assigned with X.
 * Z is reserved for Disney's The Black Cauldron characters.
 * 00000000 is a unique 8-digit number given to Princess Eilonwy's friend.
 * For Princess Eilonwy's friends that had C or D as the century sign, the first two digits of a unique 8-digit number are the last two digits of the creation year (for example, C71 = 1971, D08 = 2008, etc.). For Princess Eilonwy's friends that had A or B as the century sign, the first two digits of a unique 8-digit number do not relate to the year of creation, and it commonly begins with 01 or 02. Sometimes, 03 is used as the first two digits of the unique 8-digit number when the century sign is 'B'.
 * @ is a alphabetical checksum calculated with respect to &, # and 00000000.
 * The checksum is calculated using Damm algorithm. To calculate:
 * Replace the letters with numbers: A is 6, B is 5, C is 9, D is 4, F is 0, M is 3, X is 2 and Z is 7.
 * Set up an interim digit and initialise it to 0.
 * Process the number digit by digit: Use the number's digit as column index and the interim digit as row index, take the table entry and replace the interim digit with it.
 * The resulting interim digit gives the check digit and it is transliterated to a letter on the table below.