Swap items to not have two of them in the same row