What I want is when I click on a button a new window should get open and that window should be a child of the same main window, But what I am getting is a new Instance of a new window. How do I solve this in tkinter?
Here is the screenshot of what I do not want, Every time a new instance of window is getting is created, I want to make a child instance of same main window:

def login_success():
def c1():
top = Toplevel()
top.title("c1")
top.geometry("1000x600")
def c2():
top = Toplevel()
top.title("c1")
top.geometry("1000x600")
def c3():
top = Toplevel()
top.title("c2")
top.geometry("1000x600")
def write_frames():
top = Toplevel()
top.title("t2")
top.geometry("1000x600")
b1 = Button(top, text="c1", command=c1)
b1.pack()
b2 = Button(top, text="c2", command=c2)
b2.pack()
b3 = Button(top, text="c3", command=c3)
b3.pack()
def write_instructions():
top = Toplevel()
top.title("t1")
top.geometry("1000x600")
root = Tk()
root.geometry("1000x600")
button1 = Button(root,
text="Frames",
command=write_frames)
button1.pack()
button2 = Button(root,
text="Instructions",
command=write_instructions)
button2.pack()