class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: D = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: C = None
        self.x: H = None
        self.z: H = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: A = None
        self.o: E = None
        self.r: E = None
        self.u: A = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: C = None
        self.x: F = None
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: A = None
        self.v: D = None
        self.r: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: C = None
        self.x: H = None
        self.z: H = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: A = None
        self.o: E = None
        self.r: E = None
        self.u: A = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: C = None
        self.x: F = None
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: A = None
        self.v: D = None
        self.r: G = None
        self.txt = txt

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

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