def get_data_from_films_locations_file(path):
    """
    Return data with location and year of every film in file

    (str) -> dict
    ex. dict1['2020'] = {location1: {film1, ...}, location2: {film2, ...}}
    """
    film_locations_data = {}
    with open(path, encoding='utf-8', errors='ignore') as f:
        for line in f:
            line = line.strip()
            line_values = line.split(',')
            film, year, location = line_values[0], line_values[1],\
                line_values[-1]
            if year in film_locations_data:
                if location not in film_locations_data[year]:
                    film_locations_data[year][location] = {film}
                else:
                    film_locations_data[year][location].add(film)
            else:
                film_locations_data[year] = {location: {film}}
    return film_locations_data