  We study symplectic (contact) structures on nilmanifolds that correspond to
the filiform Lie algebras - nilpotent Lie algebras of the maximal length of the
descending central sequence. We give a complete classification of filiform Lie
algebras that possess a basis e_1, ..., e_n, [e_i,e_j]=c_{ij}e_{i{+}j}
(N-graded Lie algebras). In particular we describe the spaces of symplectic
cohomology classes for all even-dimensional algebras of the list. It is proved
that a symplectic filiform Lie algebra is a filtered deformation of some
N-graded symplectic filiform Lie algebra. But this condition is not sufficient.
A spectral sequence is constructed in order to answer the question whether a
given deformation of a N-graded symplectic filiform Lie algebra admits a
symplectic structure or not. Other applications and examples are discussed.
