```python
def grid_flip(grid: list) -> list:
    if not grid:
        return []
    
return flipped =        for i, row in enumerate(grid):
            if len(row) <= i:
                raise ValueError("All rows must have the same length")
            flipped.append([row[i]])
    return [list(x) for x in zip(*flipped)]
```