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

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: B = None
        self.r: A = None
        self.s: D = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.u: C = None
        self.y: I = None
        self.r: G = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.q: D = None
        self.s: F = None
        self.t: G = None
        self.w: C = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: B = None
        self.z: J = None
        self.v: H = None
        self.q: J = None
        self.y: C = None
        self.r: E = None
        self.w: B = None
        self.s: D = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: I = None
        self.y: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: B = None
        self.r: A = None
        self.s: D = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.u: C = None
        self.y: I = None
        self.r: G = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.q: D = None
        self.s: F = None
        self.t: G = None
        self.w: C = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: B = None
        self.z: J = None
        self.v: H = None
        self.q: J = None
        self.y: C = None
        self.r: E = None
        self.w: B = None
        self.s: D = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: I = None
        self.y: A = None
        self.txt = txt

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

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