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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: C = None
        self.x: G = None
        self.y: C = None
        self.v: C = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: D = None
        self.q: F = None
        self.y: G = None
        self.t: G = None
        self.w: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: C = None
        self.r: A = None
        self.v: H = None
        self.z: A = None
        self.u: D = None
        self.o: E = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: C = None
        self.x: A = None
        self.t: D = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: C = None
        self.v: E = None
        self.p: G = None
        self.q: G = None
        self.u: F = None
        self.x: E = None
        self.r: G = None
        self.txt = txt

c = A("c")
n = B("n")
l = C("l")
i = D("i")
d = E("d")
e = F("e")
h = G("h")
j = H("j")
k = A("k")

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: C = None
        self.x: G = None
        self.y: C = None
        self.v: C = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: D = None
        self.q: F = None
        self.y: G = None
        self.t: G = None
        self.w: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: C = None
        self.r: A = None
        self.v: H = None
        self.z: A = None
        self.u: D = None
        self.o: E = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: C = None
        self.x: A = None
        self.t: D = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: C = None
        self.v: E = None
        self.p: G = None
        self.q: G = None
        self.u: F = None
        self.x: E = None
        self.r: G = None
        self.txt = txt

c = A("c")
n = B("n")
l = C("l")
i = D("i")
d = E("d")
e = F("e")
h = G("h")
j = H("j")
k = A("k")

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