class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: C = None
        self.p: J = None
        self.o: F = None
        self.v: E = None
        self.q: E = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: H = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: J = None
        self.s: I = None
        self.q: I = None
        self.o: J = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: D = None
        self.x: I = None
        self.o: G = None
        self.w: H = None
        self.s: G = None
        self.p: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: C = None
        self.z: H = None
        self.u: E = None
        self.o: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: C = None
        self.p: J = None
        self.o: F = None
        self.v: E = None
        self.q: E = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: H = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: J = None
        self.s: I = None
        self.q: I = None
        self.o: J = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: D = None
        self.x: I = None
        self.o: G = None
        self.w: H = None
        self.s: G = None
        self.p: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: C = None
        self.z: H = None
        self.u: E = None
        self.o: I = None
        self.txt = txt

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

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