Pergunta de entrevista da empresa Gemini Solutions

Write a code to create below output a2b2c4 --> aabbcccc ab2c4 --> abbcccc