s = list(str("aaabbcc"))

a, b, c, d = 0, 0, 0, 0
for i in s:
    if i == 'a':
        a += 1
        del s[0]

print(s)
print(a, b, c, d)