In a list of index-pairs every index occurs twice
list={{15, 16}, {13, 14}, {7, 11}, {6, 7}, {12, 13}, {1, 2}, {5, 6}, {18,19},
{16, 17}, {14, 15}, {20, 21}, {19, 20}, {2, 3}, {4, 5}, {3,4}, {9, 8}, {8, 1},
{21, 10},{10, 9}, {11, 12}, {17, 18}}
My question:
I'm looking for an easy way to rearrange the pairs in such a way that neighboring indices are equal?
I would expect a result in the form
{{15, 16},{16, 17}, {17, 18}, {18,19}, {19, 20}, {20, 21},
{21, 10},..., {13, 14},{14, 15}}
Thanks!