def to_squares(grid):
    """Return a list of squares for the grid"""
    squares = []
    for _ in range(9):
        squares.append([])
    for rownum, row in enumerate(grid):
        for colnum, cell in enumerate(row):
            squareno = colnum // 3 + (rownum // 3) * 3
            squares[squareno].append(cell)
    return squares