class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: E = None
        self.s: E = None
        self.u: D = None
        self.o: G = None
        self.y: F = None
        self.v: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: B = None
        self.s: C = None
        self.p: B = None
        self.x: G = None
        self.u: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: H = None
        self.x: E = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: B = None
        self.s: C = None
        self.p: B = None
        self.x: G = None
        self.u: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: H = None
        self.x: E = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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