class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: C = None
        self.p: E = None
        self.r: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: C = None
        self.x: G = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: B = None
        self.y: C = None
        self.z: F = None
        self.r: J = None
        self.v: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: E = None
        self.s: C = None
        self.v: C = None
        self.y: E = None
        self.z: H = None
        self.o: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

e = A("e")
l = B("l")
a = C("a")
i = D("i")
h = E("h")
f = F("f")
m = G("m")
c = H("c")
n = I("n")
b = J("b")

e.t = i
e.v = a
e.p = h
e.r = n
l.q = b
l.t = a
l.x = m
l.p = h
a.s = i
i.u = a
i.y = a
i.w = l
i.z = f
i.r = b
i.v = m
h.y = a
h.t = a
h.o = l
h.x = b
h.z = i
h.p = f
h.q = m
f.u = i
m.u = a
m.s = a
m.v = a
m.o = a
m.p = h
m.y = h
m.z = c
c.o = e
n.r = h
b.q = h
assert a.s.r.q.q.z.o.t.v.z.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: C = None
        self.p: E = None
        self.r: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: C = None
        self.x: G = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: B = None
        self.y: C = None
        self.z: F = None
        self.r: J = None
        self.v: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: E = None
        self.s: C = None
        self.v: C = None
        self.y: E = None
        self.z: H = None
        self.o: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

e = A("e")
l = B("l")
a = C("a")
i = D("i")
h = E("h")
f = F("f")
m = G("m")
c = H("c")
n = I("n")
b = J("b")

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