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

class B:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: I = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: I = None
        self.o: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: F = None
        self.v: E = None
        self.p: E = None
        self.q: D = None
        self.o: A = None
        self.t: B = None
        self.y: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: I = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: I = None
        self.o: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: F = None
        self.v: E = None
        self.p: E = None
        self.q: D = None
        self.o: A = None
        self.t: B = None
        self.y: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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