class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: D = None
        self.w: D = None
        self.r: G = None
        self.q: C = None
        self.o: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: E = None
        self.v: E = None
        self.z: F = None
        self.r: C = None
        self.txt = txt

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

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

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

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

e = A("e")
g = B("g")
n = C("n")
k = D("k")
a = E("a")
l = F("l")
i = G("i")
c = H("c")
h = D("h")
m = F("m")

e.v = c
e.x = k
e.w = h
e.r = i
e.q = n
e.o = g
g.y = a
g.u = e
g.p = k
n.q = e
k.s = h
k.u = a
k.v = a
k.z = l
k.r = n
a.z = i
l.z = m
i.y = n
i.p = n
i.v = c
i.q = l
i.s = e
i.x = a
c.q = m
c.u = m
h.s = k
h.u = a
h.v = a
h.z = l
h.r = n
m.z = l
assert a.z.x.z.q.z.z.z.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: D = None
        self.w: D = None
        self.r: G = None
        self.q: C = None
        self.o: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: E = None
        self.v: E = None
        self.z: F = None
        self.r: C = None
        self.txt = txt

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

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

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

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

e = A("e")
g = B("g")
n = C("n")
k = D("k")
a = E("a")
l = F("l")
i = G("i")
c = H("c")
h = D("h")
m = F("m")

e.v = c
e.x = k
e.w = h
e.r = i
e.q = n
e.o = g
g.y = a
g.u = e
g.p = k
n.q = e
k.s = h
k.u = a
k.v = a
k.z = l
k.r = n
a.z = i
l.z = m
i.y = n
i.p = n
i.v = c
i.q = l
i.s = e
i.x = a
c.q = m
c.u = m
h.s = k
h.u = a
h.v = a
h.z = l
h.r = n
m.z = l
assert a.z.x.z.q.z.z.z.z.z.txt == "m"