s = 'a4b3c2'
out = ''
for ch in s:
    if ch.isalpha():
        x = ch
    else:
        d = int(ch)
        out = out + x * d
output = ''.join(sorted(out))
print(out)

60c3228f2e0a3884704a9df0804d988557510060
<mask token>

<mask token>
for ch in s:
    if ch.isalpha():
        x = ch
    else:
        d = int(ch)
        out = out + x * d
<mask token>
print(out)

s = 'a4b3c2'
out = ''
for ch in s:
    if ch.isalpha():
        x = ch
    else:
        d = int(ch)
        out = out + x * d
output = ''.join(sorted(out))
print(out)
