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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: C = None
        self.v: F = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: C = None
        self.v: F = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

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

m.s = f
m.u = f
n.z = c
c.r = h
c.q = e
c.v = i
c.o = j
d.r = c
d.p = h
h.u = n
i.y = k
i.q = h
j.y = n
j.o = n
j.q = k
k.u = m
e.r = h
e.q = c
e.v = i
e.o = j
f.r = h
f.q = c
f.v = i
f.o = j
assert e.r.u.z.v.txt == "i"