#!/usr/bin/env python
import fileinput, re, sys
from itertools import ifilter
re_not_foo = re.compile(r"^(f(o[^o]|[^o])|[^f])*$")
for line in ifilter(re_not_foo.match, fileinput.input()):
sys.stdout.write(line)
IyEvdXNyL2Jpbi9lbnYgcHl0aG9uCmltcG9ydCBmaWxlaW5wdXQsIHJlLCBzeXMKZnJvbSBpdGVydG9vbHMgaW1wb3J0IGlmaWx0ZXIKCnJlX25vdF9mb28gPSByZS5jb21waWxlKHIiXihmKG9bXm9dfFteb10pfFteZl0pKiQiKQpmb3IgbGluZSBpbiBpZmlsdGVyKHJlX25vdF9mb28ubWF0Y2gsIGZpbGVpbnB1dC5pbnB1dCgpKToKICAgIHN5cy5zdGRvdXQud3JpdGUobGluZSkK
ZiwgZm8gb3IgYmFyZgpmCmZvCmJhcmYKZm9vCidmb28nCmFiZGZvb2RlCmFiZGZvZGUKYWJkZmRlCmFiY2RlCmYKCiAKZm8KZm9vCmZvb28Kb2Zvb2EKb2ZvCm9mb28=
f, fo or barf
f
fo
barf
foo
'foo'
abdfoode
abdfode
abdfde
abcde
f
fo
foo
fooo
ofooa
ofo
ofoo