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

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.p: D = None
        self.u: D = None
        self.z: J = None
        self.q: A = None
        self.r: G = None
        self.w: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: B = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: J = None
        self.x: I = None
        self.r: E = None
        self.y: F = None
        self.p: A = None
        self.t: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: D = None
        self.w: C = None
        self.q: B = None
        self.o: A = None
        self.s: G = None
        self.p: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: F = None
        self.p: D = None
        self.y: D = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.p: D = None
        self.u: D = None
        self.z: J = None
        self.q: A = None
        self.r: G = None
        self.w: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: B = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: J = None
        self.x: I = None
        self.r: E = None
        self.y: F = None
        self.p: A = None
        self.t: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: D = None
        self.w: C = None
        self.q: B = None
        self.o: A = None
        self.s: G = None
        self.p: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: F = None
        self.p: D = None
        self.y: D = None
        self.u: E = None
        self.txt = txt

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

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