s = input()
pos = s.find('f')
rev_s = s[::-1]
rev_pos = rev_s.find('f')
l = len(s) - rev_pos - 1
if pos != -1:
    if l != pos:
        print(pos, l)
    elif l == pos:
        print(pos)

15b305a7dba30586b3fb34cefbca51ee12a0f1f6
<mask token>

<mask token>
if pos != -1:
    if l != pos:
        print(pos, l)
    elif l == pos:
        print(pos)

s = input()
pos = s.find('f')
rev_s = s[::-1]
rev_pos = rev_s.find('f')
l = len(s) - rev_pos - 1
if pos != -1:
    if l != pos:
        print(pos, l)
    elif l == pos:
        print(pos)
