class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: C = None
        self.q: B = None
        self.r: C = None
        self.v: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

i.z = b
i.v = b
i.t = n
i.q = l
i.r = h
c.t = b
c.q = h
c.w = i
c.u = n
h.o = j
h.w = b
h.z = i
h.q = n
j.p = b
j.x = n
b.v = h
d.t = b
d.q = h
d.u = h
d.w = i
g.t = b
g.q = n
g.w = i
g.u = h
n.o = j
n.w = b
n.z = i
n.q = h
l.t = b
l.q = h
l.u = h
l.w = i
assert l.t.v.q.w.v.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: C = None
        self.q: B = None
        self.r: C = None
        self.v: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

i.z = b
i.v = b
i.t = n
i.q = l
i.r = h
c.t = b
c.q = h
c.w = i
c.u = n
h.o = j
h.w = b
h.z = i
h.q = n
j.p = b
j.x = n
b.v = h
d.t = b
d.q = h
d.u = h
d.w = i
g.t = b
g.q = n
g.w = i
g.u = h
n.o = j
n.w = b
n.z = i
n.q = h
l.t = b
l.q = h
l.u = h
l.w = i
assert l.t.v.q.w.v.txt == "h"