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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: B = None
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: I = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: H = None
        self.q: I = None
        self.o: B = None
        self.t: F = None
        self.y: H = None
        self.s: B = None
        self.p: B = None
        self.r: H = None
        self.txt = txt

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

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

a = A("a")
m = B("m")
h = C("h")
j = D("j")
d = E("d")
c = F("c")
i = G("i")
b = H("b")
n = I("n")

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: B = None
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: I = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: H = None
        self.q: I = None
        self.o: B = None
        self.t: F = None
        self.y: H = None
        self.s: B = None
        self.p: B = None
        self.r: H = None
        self.txt = txt

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

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

a = A("a")
m = B("m")
h = C("h")
j = D("j")
d = E("d")
c = F("c")
i = G("i")
b = H("b")
n = I("n")

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