class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: G = None
        self.p: H = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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