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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: I = None
        self.v: H = None
        self.s: A = None
        self.y: J = None
        self.x: A = None
        self.t: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.p: F = None
        self.z: J = None
        self.u: F = None
        self.o: B = None
        self.q: H = None
        self.r: H = None
        self.s: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: B = None
        self.y: I = None
        self.w: G = None
        self.u: E = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.u: B = None
        self.y: F = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: D = None
        self.t: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: D = None
        self.r: E = None
        self.v: D = None
        self.s: C = None
        self.x: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: I = None
        self.v: H = None
        self.s: A = None
        self.y: J = None
        self.x: A = None
        self.t: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.p: F = None
        self.z: J = None
        self.u: F = None
        self.o: B = None
        self.q: H = None
        self.r: H = None
        self.s: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: B = None
        self.y: I = None
        self.w: G = None
        self.u: E = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.u: B = None
        self.y: F = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: D = None
        self.t: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: D = None
        self.r: E = None
        self.v: D = None
        self.s: C = None
        self.x: F = None
        self.txt = txt

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

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