class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: C = None
        self.t: G = None
        self.r: H = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: A = None
        self.o: D = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: D = None
        self.z: A = None
        self.o: G = None
        self.t: B = None
        self.w: B = None
        self.r: G = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: H = None
        self.p: H = None
        self.o: G = None
        self.w: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: A = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: A = None
        self.r: C = None
        self.y: B = None
        self.txt = txt

m = A("m")
g = B("g")
a = C("a")
c = D("c")
l = E("l")
d = F("d")
j = G("j")
e = H("e")

m.v = d
m.o = d
m.s = a
m.t = j
m.r = e
g.z = e
g.u = e
g.s = m
g.o = c
a.y = g
a.t = g
a.w = g
a.s = g
a.v = c
a.z = m
a.o = j
a.r = j
c.v = g
c.y = e
c.p = e
c.o = j
c.w = l
l.v = e
l.y = e
l.o = d
l.r = d
l.t = a
l.x = j
d.q = j
d.w = m
j.z = a
j.s = m
j.w = l
e.w = c
e.s = m
e.r = a
e.y = g
assert d.w.r.r.z.s.y.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: C = None
        self.t: G = None
        self.r: H = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: A = None
        self.o: D = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: D = None
        self.z: A = None
        self.o: G = None
        self.t: B = None
        self.w: B = None
        self.r: G = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: H = None
        self.p: H = None
        self.o: G = None
        self.w: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: A = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: A = None
        self.r: C = None
        self.y: B = None
        self.txt = txt

m = A("m")
g = B("g")
a = C("a")
c = D("c")
l = E("l")
d = F("d")
j = G("j")
e = H("e")

m.v = d
m.o = d
m.s = a
m.t = j
m.r = e
g.z = e
g.u = e
g.s = m
g.o = c
a.y = g
a.t = g
a.w = g
a.s = g
a.v = c
a.z = m
a.o = j
a.r = j
c.v = g
c.y = e
c.p = e
c.o = j
c.w = l
l.v = e
l.y = e
l.o = d
l.r = d
l.t = a
l.x = j
d.q = j
d.w = m
j.z = a
j.s = m
j.w = l
e.w = c
e.s = m
e.r = a
e.y = g
assert d.w.r.r.z.s.y.o.txt == "c"