class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: E = None
        self.x: D = None
        self.r: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: J = None
        self.r: C = None
        self.s: D = None
        self.w: C = None
        self.t: C = None
        self.v: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: A = None
        self.o: G = None
        self.y: C = None
        self.t: D = None
        self.x: C = None
        self.q: C = None
        self.p: I = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: J = None
        self.r: C = None
        self.s: D = None
        self.w: C = None
        self.t: C = None
        self.v: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: A = None
        self.o: G = None
        self.y: C = None
        self.t: D = None
        self.x: C = None
        self.q: C = None
        self.p: I = None
        self.txt = txt

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

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

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

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