#!/afs/athena/contrib/perl/perl

while (<>) {
	chop;
	next if /^\s*$/;
	($route, $path) = unpack("@3A16@59a*", $_);
	$route =~ s/\s*//;
	next if (route eq "");
	@hops = split(/\s/,$path);
#	print("$route	$path	\n");
#	print(":$route :",@hops[1], ":", @hops[2], ":\n");
	for ($i = 0; $i < $#hops; $i++) {
	    for ($j = $i+1; $j < $#hops; $j++) {
		if (@hops[$i] eq @hops[$j]) {
#		    print("$route	$path: @hops[$i] @hops[$j]\n");
		    print("$route	$path\n");
		    last;
		}
	    }
	}			
    }

