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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: E = None
        self.x: H = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: A = None
        self.v: I = None
        self.s: I = None
        self.z: H = None
        self.x: J = None
        self.u: E = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: C = None
        self.s: C = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.o: I = None
        self.q: B = None
        self.v: J = None
        self.s: F = None
        self.r: C = None
        self.y: I = None
        self.w: F = None
        self.x: G = None
        self.p: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: D = None
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: E = None
        self.x: H = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: A = None
        self.v: I = None
        self.s: I = None
        self.z: H = None
        self.x: J = None
        self.u: E = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: C = None
        self.s: C = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.o: I = None
        self.q: B = None
        self.v: J = None
        self.s: F = None
        self.r: C = None
        self.y: I = None
        self.w: F = None
        self.x: G = None
        self.p: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: D = None
        self.w: A = None
        self.txt = txt

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

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