def get_urls(
        interval, stations_kind, years_range
):
    """
    Return the urls to the IMGW database for the given 'interval', 'stations_kind'
    and 'years_range'.

    Keyword arguments:
        interval -- data interval from the IMGW database (monthly, daily, prompt)
        stations_kind -- stations' kind (synop, climat, fall)
        years_range -- years range (e.g. range(1966, 2021))
    """

    if interval == 'monthly':
        interval = 'miesieczne/'
    elif interval == 'daily':
        interval = 'dobowe/'
    elif interval == 'prompt':
        interval = 'terminowe/'
        if stations_kind == 'fall':
            raise NotADirectoryError("There's no '/dane_meteorologiczne/terminowe/opad/' directory.")
    else:
        raise ValueError("Invalid 'interval' input. Available inputs: 'monthly', 'daily', 'prompt'.")

    if stations_kind == 'synop':
        stations_kind = 'synop/'
    elif stations_kind == 'fall':
        stations_kind = 'opad/'
    elif stations_kind == 'climat':
        stations_kind = 'klimat/'
    else:
        raise ValueError("Invalid 'stations_kind' input. Available inputs: 'synop', 'fall', 'climat'.")

    years_endings = []
    for year in years_range:
        if year < 2001:
            if year > 1995:
                if years_endings.count('1996_2000/') == 0:
                    years_endings.append('1996_2000/')
            elif year > 1990:
                if years_endings.count('1991_1995/') == 0:
                    years_endings.append('1991_1995/')
            elif year > 1985:
                if years_endings.count('1986_1990/') == 0:
                    years_endings.append('1986_1990/')
            elif year > 1980:
                if years_endings.count('1981_1985/') == 0:
                    years_endings.append('1981_1985/')
            elif year > 1975:
                if years_endings.count('1976_1980/') == 0:
                    years_endings.append('1976_1980/')
            elif year > 1970:
                if years_endings.count('1971_1975/') == 0:
                    years_endings.append('1971_1975/')
            elif year > 1965:
                if years_endings.count('1966_1970/') == 0:
                    years_endings.append('1966_1970/')
            elif year > 1959:
                if years_endings.count('1960_1965/') == 0:
                    years_endings.append('1960_1965/')
            else:
                raise ValueError("No data for {}. Available years range: 1960-2021.".format(str(year)))
        else:
            years_endings.append(str(year) + '/')

    urls = []
    base_url = 'https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_meteorologiczne/'
    for ending in years_endings:
        url = base_url + interval + stations_kind + ending
        urls.append(url)
    return urls