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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: A = None
        self.u: C = None
        self.z: C = None
        self.y: C = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: H = None
        self.t: G = None
        self.y: A = None
        self.z: H = None
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: G = None
        self.w: A = None
        self.o: D = None
        self.s: B = None
        self.txt = txt

d = A("d")
a = B("a")
j = C("j")
f = D("f")
n = E("n")
l = F("l")
e = G("e")
b = H("b")

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: A = None
        self.u: C = None
        self.z: C = None
        self.y: C = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: H = None
        self.t: G = None
        self.y: A = None
        self.z: H = None
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: G = None
        self.w: A = None
        self.o: D = None
        self.s: B = None
        self.txt = txt

d = A("d")
a = B("a")
j = C("j")
f = D("f")
n = E("n")
l = F("l")
e = G("e")
b = H("b")

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