import re


def hyphenate(string):
    """Converts a camelCase to hyphenated words.
    """
    string = re.sub(r'([A-Z]+)([A-Z][a-z])', r'\1-\2', string)
    string = re.sub(r'([a-z\d])([A-Z])', r'\1-\2', string)
    return string.lower()