Keskei Numeration System

Keskei Numeration System (Spanish: Sistema de numeración Keskei, abbreviation: KNS) is a type of Hingatello and was introduced in 1979 in Spain. Before the Halloween, many of the fictional characters apply a Keskei Number before dressing as either Gnomeo or Juliet, depending on the character's gender.

Algorithm
The code has 18 digits in the format "AAA00000AXAAAXAAA000C", and are assigned as follows: To find the check digit, letters are converted to numbers, then the algorithm collects odd and even characters, multiplying the group containing the rightmost character (which is the FIRST group) by 2, adding up all individual digits, taking the 10s modulus of the sum, and subtracting from 10.
 * The first surname's initial and first inside vowel;
 * The first given name's initial;
 * Three digits for character's age (X99 for unknown/unconfirmed age);
 * Date of birth or first appearance (2 digits for year, 1 letter for month (A-E, H, L, N, Q-T), and 1 alphanumeric character for day (1-9,0,A,B,C,D,E,F,H,I,J,K,L,M,N,P,Q,R,T,U,V,X,Y));
 * A one-letter gender indicator (H for male (hombre in Spanish) or M for female (mujer in Spanish));
 * The first surname's second inside consonant;
 * The first given name's second inside consonant;
 * One letter (A-Z) indicating century;
 * Three random letters;
 * Three random numbers;
 * Luhn check digit.

For example, a character named Princess Sofia the First will have the KNS number of FIS01091DBMRFKLT3698.

Exceptions
Several exceptions to the above rules exist, including:

"Ñ"
If any step in the above procedure leads to the letter "Ñ" appearing anywhere in the KNS, the "Ñ" is replaced by the letter "N".

Catalog of Inappropriate Words
To prevent words from forming that would be deemed palabras altisonantes (foul-sounding words, such as profanity or pejoratives) in the first four characters of the string, a Catalog of Inappropriate Words (Catálogo de Palabras Inconvenientes) lists many such possible combinations and provides replacements that usually entail changing the second letter, a vowel, into the letters "X", "Y" or "Z".