class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: H = None
        self.t: D = None
        self.x: B = None
        self.q: E = None
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: H = None
        self.y: F = None
        self.q: G = None
        self.o: H = None
        self.u: B = None
        self.w: C = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: H = None
        self.y: F = None
        self.q: G = None
        self.o: H = None
        self.u: B = None
        self.w: C = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

g.v = h
g.z = b
g.t = f
g.x = c
g.q = m
g.p = m
c.o = b
n.w = h
n.o = c
f.x = b
f.v = b
f.o = b
f.y = h
f.q = d
f.p = d
f.u = c
f.w = n
m.p = b
m.w = b
m.u = b
m.s = g
h.u = m
h.q = n
h.t = c
d.v = c
b.o = g
b.q = h
b.z = m
assert c.o.o.z.o.q.s.x.txt == "c"