A table is stored as a list of rows. You want it the other way round: a list of columns.
Write flip(grid) that returns a new list of lists where row i of the result is column i of the original.
grid has the same length, and that length is at least 1.