class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: C = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: E = None
        self.y: G = None
        self.q: D = None
        self.u: G = None
        self.x: E = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: H = None
        self.q: H = None
        self.s: B = None
        self.v: B = None
        self.z: F = None
        self.x: C = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: A = None
        self.u: A = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: C = None
        self.t: C = None
        self.u: G = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: F = None
        self.txt = txt

a = A("a")
e = B("e")
c = C("c")
m = D("m")
l = E("l")
i = F("i")
b = G("b")
d = H("d")
j = G("j")

a.t = d
a.u = c
a.p = e
e.z = b
e.y = b
e.u = b
e.r = l
e.x = l
e.q = m
e.t = j
c.x = j
m.y = l
m.w = d
m.q = d
m.s = e
m.v = e
m.z = i
m.x = c
m.o = b
l.z = d
l.q = a
l.u = a
l.v = m
i.w = e
i.z = e
i.y = c
i.t = c
i.u = j
b.w = l
b.z = m
d.z = e
d.y = i
j.w = l
j.z = m
assert c.x.z.o.w.q.u.x.w.z.txt == "
class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: C = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: E = None
        self.y: G = None
        self.q: D = None
        self.u: G = None
        self.x: E = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: H = None
        self.q: H = None
        self.s: B = None
        self.v: B = None
        self.z: F = None
        self.x: C = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: A = None
        self.u: A = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: C = None
        self.t: C = None
        self.u: G = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: F = None
        self.txt = txt

a = A("a")
e = B("e")
c = C("c")
m = D("m")
l = E("l")
i = F("i")
b = G("b")
d = H("d")
j = G("j")

a.t = d
a.u = c
a.p = e
e.z = b
e.y = b
e.u = b
e.r = l
e.x = l
e.q = m
e.t = j
c.x = j
m.y = l
m.w = d
m.q = d
m.s = e
m.v = e
m.z = i
m.x = c
m.o = b
l.z = d
l.q = a
l.u = a
l.v = m
i.w = e
i.z = e
i.y = c
i.t = c
i.u = j
b.w = l
b.z = m
d.z = e
d.y = i
j.w = l
j.z = m
assert c.x.z.o.w.q.u.x.w.z.txt == "d"