def gc_skew(substring):
    if len(substring) == 0:
        return 0
    else:
        g,c = count_gc(substring)
        return (g-c)

def count_gc(substring):
    return (substring.count("G"),substring.count("C"))

def genome_skew(genome):
    return [gc_skew(genome[:i]) for i in range(len(genome) + 1)]

def find_min_skews(genome):
    skew = genome_skew(genome)
    min_skew = min(skew)
    return [i for i,v in enumerate(skew) if v == min_skew]
        


genome = input()
print(find_min_skews(genome))

66106d8b166ed0abc11058171a56d6da0efab030
def gc_skew(substring):
    if len(substring) == 0:
        return 0
    else:
        g, c = count_gc(substring)
        return g - c


<mask token>


def genome_skew(genome):
    return [gc_skew(genome[:i]) for i in range(len(genome) + 1)]


def find_min_skews(genome):
    skew = genome_skew(genome)
    min_skew = min(skew)
    return [i for i, v in enumerate(skew) if v == min_skew]


<mask token>

def gc_skew(substring):
    if len(substring) == 0:
        return 0
    else:
        g, c = count_gc(substring)
        return g - c


def count_gc(substring):
    return substring.count('G'), substring.count('C')


def genome_skew(genome):
    return [gc_skew(genome[:i]) for i in range(len(genome) + 1)]


def find_min_skews(genome):
    skew = genome_skew(genome)
    min_skew = min(skew)
    return [i for i, v in enumerate(skew) if v == min_skew]


<mask token>

def gc_skew(substring):
    if len(substring) == 0:
        return 0
    else:
        g, c = count_gc(substring)
        return g - c


def count_gc(substring):
    return substring.count('G'), substring.count('C')


def genome_skew(genome):
    return [gc_skew(genome[:i]) for i in range(len(genome) + 1)]


def find_min_skews(genome):
    skew = genome_skew(genome)
    min_skew = min(skew)
    return [i for i, v in enumerate(skew) if v == min_skew]


<mask token>
print(find_min_skews(genome))

def gc_skew(substring):
    if len(substring) == 0:
        return 0
    else:
        g, c = count_gc(substring)
        return g - c


def count_gc(substring):
    return substring.count('G'), substring.count('C')


def genome_skew(genome):
    return [gc_skew(genome[:i]) for i in range(len(genome) + 1)]


def find_min_skews(genome):
    skew = genome_skew(genome)
    min_skew = min(skew)
    return [i for i, v in enumerate(skew) if v == min_skew]


genome = input()
print(find_min_skews(genome))

def gc_skew(substring):
    if len(substring) == 0:
        return 0
    else:
        g,c = count_gc(substring)
        return (g-c)

def count_gc(substring):
    return (substring.count("G"),substring.count("C"))

def genome_skew(genome):
    return [gc_skew(genome[:i]) for i in range(len(genome) + 1)]

def find_min_skews(genome):
    skew = genome_skew(genome)
    min_skew = min(skew)
    return [i for i,v in enumerate(skew) if v == min_skew]
        


genome = input()
print(find_min_skews(genome))
