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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: C = None
        self.o: A = None
        self.y: E = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: A = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: B = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: D = None
        self.u: D = None
        self.z: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: C = None
        self.o: A = None
        self.y: E = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: A = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: B = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: D = None
        self.u: D = None
        self.z: B = None
        self.txt = txt

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

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