N = int(input()) S = list(input()) ans = [] count = 1 for i in range(N - 1): if S[i] != S[i + 1]: ans.append(count) count = 1 else: count += 1 ans.append(count) nokori = 26 - len(ans) ans_after = list(map(str, ans)) print("".join(ans_after) + str(nokori * "0")) # print(a)