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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: A = None
        self.u: E = None
        self.y: H = None
        self.q: D = None
        self.r: A = None
        self.t: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: F = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: A = None
        self.u: E = None
        self.y: H = None
        self.q: D = None
        self.r: A = None
        self.t: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: F = None
        self.u: G = None
        self.txt = txt

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

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