i think it would help you if you write out the hypotheses and not think of it in rows etc. This is a recent open access paper covering the topic: 3 groups All pairwise comparisons may not necessarily be of interest but there would be k(k-1)/2 comparisons