class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: E = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: H = None
        self.y: I = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: H = None
        self.z: D = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: G = None
        self.o: G = None
        self.p: F = None
        self.y: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: J = None
        self.o: J = None
        self.u: H = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: B = None
        self.v: D = None
        self.t: H = None
        self.r: B = None
        self.u: C = None
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: H = None
        self.y: I = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: H = None
        self.z: D = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: G = None
        self.o: G = None
        self.p: F = None
        self.y: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: J = None
        self.o: J = None
        self.u: H = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: B = None
        self.v: D = None
        self.t: H = None
        self.r: B = None
        self.u: C = None
        self.w: A = None
        self.txt = txt

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

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