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

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

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: I = None
        self.p: I = None
        self.o: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: H = None
        self.w: I = None
        self.y: E = None
        self.s: G = None
        self.v: E = None
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: B = None
        self.u: H = None
        self.t: J = None
        self.y: J = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: J = None
        self.x: B = None
        self.o: G = None
        self.t: F = None
        self.q: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: H = None
        self.y: E = None
        self.o: A = None
        self.z: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: I = None
        self.p: I = None
        self.o: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: H = None
        self.w: I = None
        self.y: E = None
        self.s: G = None
        self.v: E = None
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: B = None
        self.u: H = None
        self.t: J = None
        self.y: J = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: J = None
        self.x: B = None
        self.o: G = None
        self.t: F = None
        self.q: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: H = None
        self.y: E = None
        self.o: A = None
        self.z: D = None
        self.txt = txt

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

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