Hmm.. well that's not the way to go. Just because representatives of classes commute, doesn't mean that all elements between the classes commute. For example, consider the classes
. There must be another way..
EDIT: Try this.
First, we need the fact that, for any finite group
and subgroup
,
.
Now, we let
act on itself by conjugation. Since it is assumed that the
commute pairwise, we have
for all
. That is, for each
,
(the stabilizer of
under this group action).
Let
be arbitrary. Then there exist
such that
. Hence
for each
.
We have shown that, for any
, we can find
so that
. It follows that
(for each
).
By the claim above, since
is finite, this forces
for each
. That is, the conjugacy class of
is
. We know that this means
and, since these elements form a complete set of representatives for the conjugacy classes of
,
, and the group is abelian.