class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: D = None
        self.u: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: D = None
        self.t: B = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: G = None
        self.r: E = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: F = None
        self.u: F = None
        self.z: G = None
        self.s: I = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: D = None
        self.t: B = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: G = None
        self.r: E = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: F = None
        self.u: F = None
        self.z: G = None
        self.s: I = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

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

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