def dyck_words_str(n):
    """
    All words consisting of n pairs of correctly matched parentheses
    """
    
    def dyck_recur(S):
        a = S.count("(")
        b = S.count(")")
        if len(S) > 2*n or b > a:
            return None
        elif a == b == n:
            yield S
        else:
            yield from dyck_recur(S+"(")
            yield from dyck_recur(S+")")
    
    yield from dyck_recur("")