def memo(em: str, k: int, m: list):
    """
    Helper method for dynamic programming method -> memoize

    :param em: encoded message
    :param k:
    :param m: memo lookup variable
    :return: int
    """

    if k == 0:
        return 1

    s = len(em) - k
    if em[s] == '0':
        return 0

    if m[k] is not None:
        return m[k]

    result = memo(em, k - 1, m)
    if k >= 2 and int(em[s:s + 2]) <= 26:
        result += memo(em, k - 2, m)

    m[k] = result

    return result