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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: C = None
        self.o: H = None
        self.w: C = None
        self.q: G = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: F = None
        self.q: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: G = None
        self.t: G = None
        self.x: A = None
        self.r: I = None
        self.z: B = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.x: A = None
        self.t: G = None
        self.o: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: A = None
        self.r: J = None
        self.z: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: H = None
        self.y: F = None
        self.v: B = None
        self.z: C = None
        self.o: H = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: C = None
        self.o: H = None
        self.w: C = None
        self.q: G = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: F = None
        self.q: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: G = None
        self.t: G = None
        self.x: A = None
        self.r: I = None
        self.z: B = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.x: A = None
        self.t: G = None
        self.o: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: A = None
        self.r: J = None
        self.z: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: H = None
        self.y: F = None
        self.v: B = None
        self.z: C = None
        self.o: H = None
        self.t: A = None
        self.txt = txt

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

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