We discuss a model of a cavity filled with a passive nonlinear 'Kerr'
medium and periodically kicked by a series of ultra-short laser pulses
. The nonlinear medium is described by the (2q - 1)th nonlinearity chi
((2q-1)). We find analytical formulas describing the field states insi
de the cavity. We show that such a system can produce, depending on th
e order of the nonlinearity, superpositions of several Fock states wit
h the small photon numbers (0,1;0,1,2; etc). In particular, the one-ph
oton slate can be approached during the evolution of the system with c
hi((3)) nonlinearity provided the cavity losses are negligible. The pu
rity of states generated in this process, however, can be seriously de
graded by the cavity damping. We perform numerical calculations to val
idate our analytical results.