Forming sets from pairs of numbers
First and foremost : your code contains a subtle bug.
Try this input : {"1 2", "4 3", "5 5", "2 3", "1 3"}

As for style;


please respect standard naming conventions.
seperate concerns : parsing the string into a pair should be done in a separate method, this will improve readability.
it's unclear from just looking at your code what the algorithm does exactly. Try finding a better name for the method and certain variables. If that's insufficient, some documentation can also help.
probably this is an exercise, as your algorithm simply prints its result, rather than return it. But generally such methods are useless, plus it mingles concerns again. Make the method return its result, and make a client method print the result. The main method would then call three methods


&#65279;

List&lt;Set&lt;Integer&gt;&gt; pairs = parse(input);
List&lt;Set&lt;Integer&gt;&gt; clusters = calculateClusters(pairs);
print(clusters);