from random import random

time = 5
car_positions = [1, 1, 1]

while time:
    # decrease time
    time -= 1
    
    print('')
    for i in range(len(car_positions)):
        # move car
        if random() > 0.3:
            car_positions[i] += 1
            
        # draw car
        print('-' * car_positions[i])