from itertools import groupby def runLengthEncode(S: str) -> list[tuple]: grouped = groupby(S) res = [] for k, v in grouped: res.append((k, int(len(list(v))))) return res def Main(): s=input() t=runLengthEncode(s) for x in t: print(x[0],end="") print() Main()