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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: F = None
        self.v: J = None
        self.u: B = None
        self.p: J = None
        self.x: I = None
        self.w: C = None
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: J = None
        self.u: E = None
        self.o: I = None
        self.x: D = None
        self.p: G = None
        self.r: A = None
        self.q: A = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: G = None
        self.p: A = None
        self.x: A = None
        self.w: F = None
        self.q: J = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: F = None
        self.v: J = None
        self.u: B = None
        self.p: J = None
        self.x: I = None
        self.w: C = None
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: J = None
        self.u: E = None
        self.o: I = None
        self.x: D = None
        self.p: G = None
        self.r: A = None
        self.q: A = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: G = None
        self.p: A = None
        self.x: A = None
        self.w: F = None
        self.q: J = None
        self.txt = txt

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

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

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

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