Let A be a matrix whose first column is col1 and whose second column is col2.
Consider points P,Q,R,S and T,U,V,W in the input and output grids below:
How should we reorder the list T,U,V,W so that A sends P to the first point in the list, A sends Q to the second point on the list, A sends R to the third point on the list, and A sends S to the fourth point on the list?