IDZ Digital Interview Question

Given string input: a2b3c4 output: aabbbccc