class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: C = None
        self.p: C = None
        self.z: I = None
        self.r: F = None
        self.u: C = None
        self.v: H = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: J = None
        self.u: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: J = None
        self.u: G = None
        self.txt = txt

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

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

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