Adapting Heike's fine answer from the prior question:
pairs //. x_ :> Union @@@ Gather[x, # ⋂ #2 =!= {} &]
{{1, 6, 10, 13, 36}, {12, 14, 16, 23}, {11, 21, 22, 35}, {3, 5, 9}, {17, 20, 24, 25, 28, 32}, {4, 7, 19, 26, 30, 33, 34}, {2, 8, 15, 18, 27, 29, 31}}