Note that some of the an may be repeated, in which case B has multiple zeros at those points.
Thus, all that remains is to repeat the construction for f in place of g.
Go to List of words starting with:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
Y
Z