def rivers_with_station(stations):
    """
    Given a list of station objects, returns a set with the names of the
    rivers with a monitoring station. As the container is a set, there are no duplicates.
    """
    stationed_rivers = set()
    for station in stations:
        if station.river:
            stationed_rivers.add(station.river)

    return stationed_rivers