#!/bin/sh
grep "^\(f\(o\([^o]\|$\)\|\([^o]\|$\)\)\|[^f]\)*$"
IyEvYmluL3NoCmdyZXAgIl5cKGZcKG9cKFteb11cfCRcKVx8XChbXm9dXHwkXClcKVx8W15mXVwpKiQi
ZiwgZm8gb3IgYmFyZgpmCmZvCmJhcmYKZm9vCidmb28nCmFiZGZvb2RlCmFiZGZvZGUKYWJkZmRlCmFiY2RlCmYKCiAKZm8KZm9vCmZvb28Kb2Zvb2EKb2ZvCm9mb28=
f, fo or barf
f
fo
barf
foo
'foo'
abdfoode
abdfode
abdfde
abcde
f
fo
foo
fooo
ofooa
ofo
ofoo