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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: B = None
        self.u: H = None
        self.o: A = None
        self.p: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: D = None
        self.w: G = None
        self.y: F = None
        self.z: C = None
        self.u: I = None
        self.p: E = None
        self.x: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: H = None
        self.o: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: H = None
        self.y: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: B = None
        self.u: H = None
        self.o: A = None
        self.p: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: D = None
        self.w: G = None
        self.y: F = None
        self.z: C = None
        self.u: I = None
        self.p: E = None
        self.x: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: H = None
        self.o: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: H = None
        self.y: H = None
        self.txt = txt

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

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