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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: G = None
        self.p: D = None
        self.r: G = None
        self.q: D = None
        self.v: C = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: C = None
        self.u: J = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: C = None
        self.v: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: F = None
        self.x: F = None
        self.s: F = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: A = None
        self.p: J = None
        self.q: J = None
        self.o: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: A = None
        self.v: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: G = None
        self.p: D = None
        self.r: G = None
        self.q: D = None
        self.v: C = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: C = None
        self.u: J = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: C = None
        self.v: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: F = None
        self.x: F = None
        self.s: F = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: A = None
        self.p: J = None
        self.q: J = None
        self.o: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: A = None
        self.v: E = None
        self.txt = txt

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

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