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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: A = None
        self.p: H = None
        self.o: B = None
        self.v: B = None
        self.r: B = None
        self.t: H = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: B = None
        self.p: C = None
        self.y: H = None
        self.t: B = None
        self.r: E = None
        self.z: B = None
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: C = None
        self.t: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: A = None
        self.p: H = None
        self.o: B = None
        self.v: B = None
        self.r: B = None
        self.t: H = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: B = None
        self.p: C = None
        self.y: H = None
        self.t: B = None
        self.r: E = None
        self.z: B = None
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: C = None
        self.t: B = None
        self.txt = txt

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

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