Pergunta de entrevista da empresa Microsoft

You are given 3 integers representing "A", "B", "C" write a function to print the longest string possible without repeating the same letter 3 times in a row