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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: F = None
        self.s: F = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

i = A("i")
e = B("e")
a = C("a")
h = D("h")
c = E("c")
j = F("j")
f = G("f")
d = H("d")
b = E("b")
g = C("g")

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: F = None
        self.s: F = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

i = A("i")
e = B("e")
a = C("a")
h = D("h")
c = E("c")
j = F("j")
f = G("f")
d = H("d")
b = E("b")
g = C("g")

i.z = h
i.o = e
i.v = a
e.p = i
e.v = j
e.s = j
e.y = d
a.q = i
a.x = i
h.u = b
c.q = b
c.u = b
c.y = b
c.r = j
c.x = j
c.o = j
c.z = i
c.t = g
j.s = a
j.u = c
j.v = f
j.t = g
j.x = g
f.v = j
d.o = e
b.q = c
b.u = c
b.y = c
b.r = j
b.x = j
b.o = j
b.z = i
b.t = g
g.q = i
g.x = i
assert d.o.p.v.x.v.q.z.txt == "h"