Cycles and spanning trees