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

class B:
    def __init__(self, txt: str):
        self.y: J = None
        self.u: G = None
        self.s: D = None
        self.w: J = None
        self.o: F = None
        self.q: J = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: A = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: E = None
        self.z: C = None
        self.q: A = None
        self.y: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: J = None
        self.u: G = None
        self.s: D = None
        self.w: J = None
        self.o: F = None
        self.q: J = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: A = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: E = None
        self.z: C = None
        self.q: A = None
        self.y: G = None
        self.txt = txt

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

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