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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: D = None
        self.s: A = None
        self.z: G = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: C = None
        self.q: C = None
        self.s: B = None
        self.y: C = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: B = None
        self.u: A = None
        self.t: B = None
        self.w: B = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: D = None
        self.w: D = None
        self.y: I = None
        self.u: H = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: C = None
        self.u: D = None
        self.p: B = None
        self.z: A = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: D = None
        self.s: A = None
        self.z: G = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: C = None
        self.q: C = None
        self.s: B = None
        self.y: C = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: B = None
        self.u: A = None
        self.t: B = None
        self.w: B = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: D = None
        self.w: D = None
        self.y: I = None
        self.u: H = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: C = None
        self.u: D = None
        self.p: B = None
        self.z: A = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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