  We study Hamiltonian paths and cycles in undirected graphs from an operadic
viewpoint. We show that the graphical collection $\mathsf{Ham}$ encoding
directed Hamiltonian paths in connected graphs admits an operad-like structure,
called a contractad. Similarly, we construct the graphical collection of
Hamiltonian cycles $\mathsf{CycHam}$ that forms a right module over the
contractad $\mathsf{Ham}$. We use the machinery of contractad generating series
for counting Hamiltonian paths/cycles for particular types of graphs.
