def rivers_with_station(stations):
    """The function rivers_with_station returns a set of rivers which have an associated station."""
    # creates an array of rivers
    rivers = []

    # appends river into river list for each station
    for station in stations:
        rivers.append(station.river)
    
    # turns it into a set so that there are no repeats
    return set(rivers)