def charIntMaps( chars ):
    """Generates encoding/decoding dictionaries"""

    charToInt = { c : i for i, c in enumerate( sorted(chars) ) }
    intToChar = { i : c for i, c in enumerate( sorted(chars) ) }

    return ( charToInt, intToChar )