##
#!/usr/bin/perl -w
use strict;
use Graph::Undirected;
my $net = Graph::Undirected->new;
while () {
$net = $net->add_edge( split );
}
my @e = $net->edges();
print shift@e,shift@e,"\n" while @e;
__END__
0 1
1 0
####
01
01
10
10