# Write your solution after the class Car
# Do not make changes to the class!
class Car:
    def __init__(self, make: str, top_speed: int):
        self.make = make
        self.top_speed = top_speed

    def __str__(self):
        return f"Car (make: {self.make}, top speed: {self.top_speed})"

# WRITE YOUR SOLUTION HERE:

def fastest_car(cars: list):
    max_speed = cars[0].top_speed
    name = cars[0].make
    for car in cars:
        if car.top_speed > max_speed:
            name = car.make
            max_speed = car.top_speed
    return name

    
if __name__ == "__main__":
    car1 = Car("Saab", 195)
    car2 = Car("Lada", 110)
    car3 = Car("Ferrari", 280)
    car4 = Car("Trabant", 85)

    cars = [car1, car2, car3, car4]
    print(fastest_car(cars))

    car5 = Car("Lamborghini", 120)
    car6 = Car("Bugatti", 120)
    car7 = Car("Trabant", 160)
    cars = [car5, car6,car7]
    print(fastest_car(cars))
