import ast


def check_complexexpr(node):
    """
    Checks if there are expressions containing expressions other
    than `ast.Name`, `ast.Num`, and `ast.Str`.
    """
    class Visitor(ast.NodeVisitor):
        
        def __init__(self):
            self.found = False
            self.stack = []
        
        def visit(self, node):
            
            if isinstance(node, ast.Name):
                return
            if isinstance(node, ast.Str):
                return
            if isinstance(node, ast.Num):
                return

            if isinstance(node, ast.expr):
                for n in reversed(self.stack):
                    if isinstance(n, ast.expr):
                        self.found = True
                    if isinstance(n, ast.stmt):
                        if isinstance(n, ast.Assign):
                            break
                        if isinstance(n, ast.Expr):
                            break
                        if isinstance(n, ast.Delete) and isinstance(node, ast.Subscript):
                            break
                        if isinstance(n, ast.Delete) and isinstance(node, ast.Attribute):
                            break
                            
                        self.found = True
     
            
            self.stack.append(node)
            
            self.generic_visit(node)
             
            if node != self.stack.pop():
                raise ValueError("stack corrupt")

            
    visitor = Visitor()
    visitor.visit(node)
    return visitor.found