Pergunta de entrevista da empresa Bloomberg

Print the first 9 non-duplicate characters from a string.