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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: H = None
        self.u: F = None
        self.r: D = None
        self.q: F = None
        self.t: H = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: A = None
        self.o: D = None
        self.y: A = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: F = None
        self.s: C = None
        self.t: B = None
        self.v: A = None
        self.z: B = None
        self.p: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

e = A("e")
c = B("c")
f = C("f")
n = D("n")
i = E("i")
m = F("m")
b = G("b")
h = H("h")

e.v = c
e.s = h
c.o = i
c.z = h
c.t = h
c.p = h
c.u = m
c.q = m
c.r = n
f.p = c
f.u = e
f.y = e
f.o = n
f.v = h
n.u = e
n.v = e
n.w = m
n.s = f
n.p = f
n.t = c
n.z = c
i.z = n
m.y = e
m.q = e
m.w = n
m.s = n
b.z = n
h.q = n
h.r = i
assert e.v.z.q.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: H = None
        self.u: F = None
        self.r: D = None
        self.q: F = None
        self.t: H = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: A = None
        self.o: D = None
        self.y: A = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: F = None
        self.s: C = None
        self.t: B = None
        self.v: A = None
        self.z: B = None
        self.p: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

e = A("e")
c = B("c")
f = C("f")
n = D("n")
i = E("i")
m = F("m")
b = G("b")
h = H("h")

e.v = c
e.s = h
c.o = i
c.z = h
c.t = h
c.p = h
c.u = m
c.q = m
c.r = n
f.p = c
f.u = e
f.y = e
f.o = n
f.v = h
n.u = e
n.v = e
n.w = m
n.s = f
n.p = f
n.t = c
n.z = c
i.z = n
m.y = e
m.q = e
m.w = n
m.s = n
b.z = n
h.q = n
h.r = i
assert e.v.z.q.s.v.txt == "h"