#!/bin/sh
grep "^\(f\(o\([^o]\|$\)\|\([^o]\|$\)\)\|[^f]\)*$"