from typing import List


def get_routes(vehicles: List[int], stops: List[int]):
    """
    Create dict of vehicles (key) and their routes (value).

    :vehicles:      list of vehicle identities (same order as demand)
    :stops:        list of stop numbers (same order as vehicles)

    return dict
    """
    counts = {}
    for vehicle in vehicles:
        if vehicle in counts:
            counts[vehicle] += 1
        else:
            counts[vehicle] = 1

    routes = {}
    for i, vehicle in enumerate(vehicles):
        if vehicle not in routes:
            routes[vehicle] = [None for j in range(counts[vehicle])]

        routes[vehicle][int(stops[i]) - 1] = i

    return routes