class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: D = None
        self.w: B = None
        self.y: D = None
        self.v: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: A = None
        self.q: A = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: A = None
        self.y: D = None
        self.txt = txt

h = A("h")
n = B("n")
i = C("i")
a = D("a")
l = E("l")
d = C("d")
e = B("e")
j = C("j")
g = D("g")
c = A("c")

h.w = e
h.t = g
n.x = e
n.w = e
n.v = e
n.q = g
n.y = g
i.u = c
i.w = c
i.q = c
i.t = l
a.s = g
l.o = a
l.z = c
l.y = g
d.u = c
d.w = c
d.q = h
d.t = l
e.x = n
e.w = n
e.v = n
e.q = g
e.y = a
j.u = h
j.w = h
j.q = h
j.t = l
g.s = a
c.w = e
c.t = a
assert j.t.z.w.x.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: D = None
        self.w: B = None
        self.y: D = None
        self.v: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: A = None
        self.q: A = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: A = None
        self.y: D = None
        self.txt = txt

h = A("h")
n = B("n")
i = C("i")
a = D("a")
l = E("l")
d = C("d")
e = B("e")
j = C("j")
g = D("g")
c = A("c")

h.w = e
h.t = g
n.x = e
n.w = e
n.v = e
n.q = g
n.y = g
i.u = c
i.w = c
i.q = c
i.t = l
a.s = g
l.o = a
l.z = c
l.y = g
d.u = c
d.w = c
d.q = h
d.t = l
e.x = n
e.w = n
e.v = n
e.q = g
e.y = a
j.u = h
j.w = h
j.q = h
j.t = l
g.s = a
c.w = e
c.t = a
assert j.t.z.w.x.txt == "n"