Use a C++ map to remove duplicate second codewords
A simpler de-duplication method