class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: E = None
        self.o: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.x: H = None
        self.y: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: I = None
        self.t: D = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: C = None
        self.x: F = None
        self.t: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: C = None
        self.o: G = None
        self.t: H = None
        self.r: C = None
        self.x: B = None
        self.u: H = None
        self.z: I = None
        self.v: B = None
        self.txt = txt

n = A("n")
k = B("k")
a = C("a")
b = D("b")
e = E("e")
d = F("d")
c = G("c")
f = H("f")
j = I("j")
m = J("m")

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.x: H = None
        self.y: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: I = None
        self.t: D = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: C = None
        self.x: F = None
        self.t: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: C = None
        self.o: G = None
        self.t: H = None
        self.r: C = None
        self.x: B = None
        self.u: H = None
        self.z: I = None
        self.v: B = None
        self.txt = txt

n = A("n")
k = B("k")
a = C("a")
b = D("b")
e = E("e")
d = F("d")
c = G("c")
f = H("f")
j = I("j")
m = J("m")

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