class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: F = None
        self.v: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: B = None
        self.w: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: I = None
        self.w: F = None
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: D = None
        self.s: H = None
        self.y: D = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: B = None
        self.w: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: I = None
        self.w: F = None
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: D = None
        self.s: H = None
        self.y: D = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

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