Proposal for generating even and odd coherent states