下列代码执行后的输出顺序是( )。
class Base: def __init__(self): print("B ", end="") def __del__(self): print("~B ", end="") class Derived(Base): def __init__(self): super().__init__() print("D ", end="") def __del__(self): print("~D ", end="") def main(): p = Derived() del p main()