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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: B = None
        self.t: E = None
        self.z: E = None
        self.o: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: C = None
        self.p: I = None
        self.y: A = None
        self.s: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: E = None
        self.q: H = None
        self.t: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: B = None
        self.t: E = None
        self.z: E = None
        self.o: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: C = None
        self.p: I = None
        self.y: A = None
        self.s: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: E = None
        self.q: H = None
        self.t: A = None
        self.txt = txt

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

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

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