class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: J = None
        self.w: H = None
        self.u: J = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: A = None
        self.s: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: E = None
        self.y: G = None
        self.p: D = None
        self.x: J = None
        self.o: D = None
        self.q: E = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: F = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: J = None
        self.w: H = None
        self.u: J = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: A = None
        self.s: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: E = None
        self.y: G = None
        self.p: D = None
        self.x: J = None
        self.o: D = None
        self.q: E = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: F = None
        self.t: F = None
        self.txt = txt

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

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

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

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