perl -e 'undef $/; my $text=<>; 1 while $text =~ s/\b(\w+\d+)\s*\1\b/$1/gi; pring $text; $/="\n";' list