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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: H = None
        self.v: F = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: G = None
        self.q: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: G = None
        self.v: A = None
        self.o: A = None
        self.p: A = None
        self.z: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: H = None
        self.v: F = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: G = None
        self.q: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: G = None
        self.v: A = None
        self.o: A = None
        self.p: A = None
        self.z: C = None
        self.txt = txt

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

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

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