class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: D = None
        self.z: F = None
        self.x: J = None
        self.u: G = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: E = None
        self.p: E = None
        self.v: F = None
        self.z: H = None
        self.t: D = None
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: B = None
        self.o: H = None
        self.q: J = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: C = None
        self.z: C = None
        self.w: F = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: C = None
        self.z: B = None
        self.v: A = None
        self.u: A = None
        self.q: A = None
        self.w: D = None
        self.s: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: E = None
        self.p: E = None
        self.v: F = None
        self.z: H = None
        self.t: D = None
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: B = None
        self.o: H = None
        self.q: J = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: C = None
        self.z: C = None
        self.w: F = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: C = None
        self.z: B = None
        self.v: A = None
        self.u: A = None
        self.q: A = None
        self.w: D = None
        self.s: E = None
        self.txt = txt

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

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

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