eulerianCycle and eulerianPath generics