class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: D = None
        self.q: C = None
        self.x: G = None
        self.s: G = None
        self.u: C = None
        self.t: D = None
        self.p: A = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: F = None
        self.o: F = None
        self.q: H = None
        self.z: E = None
        self.y: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: G = None
        self.w: D = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: G = None
        self.u: B = None
        self.r: D = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: I = None
        self.q: B = None
        self.z: I = None
        self.t: B = None
        self.o: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: H = None
        self.s: J = None
        self.p: B = None
        self.z: A = None
        self.q: J = None
        self.r: B = None
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: G = None
        self.v: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: D = None
        self.q: C = None
        self.x: G = None
        self.s: G = None
        self.u: C = None
        self.t: D = None
        self.p: A = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: F = None
        self.o: F = None
        self.q: H = None
        self.z: E = None
        self.y: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: G = None
        self.w: D = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: G = None
        self.u: B = None
        self.r: D = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: I = None
        self.q: B = None
        self.z: I = None
        self.t: B = None
        self.o: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: H = None
        self.s: J = None
        self.p: B = None
        self.z: A = None
        self.q: J = None
        self.r: B = None
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: G = None
        self.v: G = None
        self.txt = txt

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

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