from typing import Type
from typing import List


def all_subclasses(cls: Type) -> List[Type]:
    """Return all subclasses of class recursivley.

    :param class cls: Class for which subclasses will be returned.
    :rtype: list(class)
    """
    return cls.__subclasses__() + [
        g for s in cls.__subclasses__() for g in all_subclasses(s)
    ]