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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: I = None
        self.o: C = None
        self.p: F = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: I = None
        self.p: J = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: I = None
        self.o: C = None
        self.p: F = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: I = None
        self.p: J = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: E = None
        self.txt = txt

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

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

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

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