class A:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: C = None
        self.r: G = None
        self.v: J = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: D = None
        self.t: A = None
        self.z: D = None
        self.p: B = None
        self.v: G = None
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: H = None
        self.t: D = None
        self.q: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: C = None
        self.r: G = None
        self.v: J = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: D = None
        self.t: A = None
        self.z: D = None
        self.p: B = None
        self.v: G = None
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: H = None
        self.t: D = None
        self.q: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: E = None
        self.txt = txt

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

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