cycles n tree
  | (null . subForest) tree = []
  | otherwise = concatMap
              ( fmap (rootLabel tree :)
              . filter (not.null)
              . cycles (n-1)
              ) $ subForest tree
cycles n tree
  | (null . subForest) tree = []
  | otherwise = concatMap
              ( fmap (rootLabel tree :)
              . filter (not.null)
              . cycles (n-1)
              ) $ subForest tree
cycles n tree
  | (null . subForest) tree = []
  | otherwise = concatMap
              ( fmap (rootLabel tree :)
              . filter (not.null)
              . cycles (n-1)
              ) $ subForest tree