class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: D = None
        self.z: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: F = None
        self.q: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: C = None
        self.p: A = None
        self.txt = txt

m = A("m")
b = B("b")
l = C("l")
j = D("j")
i = E("i")
e = F("e")
n = G("n")
h = H("h")
a = B("a")

m.s = l
m.x = j
m.z = a
b.w = n
l.t = n
l.z = i
l.q = i
j.y = i
j.q = i
j.s = e
i.t = n
i.v = n
i.x = l
e.t = i
e.r = i
e.q = i
e.x = i
e.z = j
e.s = n
e.p = m
e.w = b
n.w = m
n.p = m
n.r = l
n.s = j
n.t = e
n.y = h
n.z = i
n.x = a
h.w = l
h.y = l
h.p = m
a.w = n
assert m.s.q.v.z.t.p.z.w.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: D = None
        self.z: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: F = None
        self.q: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: C = None
        self.p: A = None
        self.txt = txt

m = A("m")
b = B("b")
l = C("l")
j = D("j")
i = E("i")
e = F("e")
n = G("n")
h = H("h")
a = B("a")

m.s = l
m.x = j
m.z = a
b.w = n
l.t = n
l.z = i
l.q = i
j.y = i
j.q = i
j.s = e
i.t = n
i.v = n
i.x = l
e.t = i
e.r = i
e.q = i
e.x = i
e.z = j
e.s = n
e.p = m
e.w = b
n.w = m
n.p = m
n.r = l
n.s = j
n.t = e
n.y = h
n.z = i
n.x = a
h.w = l
h.y = l
h.p = m
a.w = n
assert m.s.q.v.z.t.p.z.w.txt == "n"