import itertools import random def generate_possible_positions(num_grids): possible_positions = list(itertools.product(100, repeat=num_grids+1)) return possib