class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: J = None
        self.p: H = None
        self.o: G = None
        self.w: D = None
        self.t: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: J = None
        self.t: F = None
        self.r: D = None
        self.v: D = None
        self.u: H = None
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: E = None
        self.x: H = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: H = None
        self.o: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: E = None
        self.t: J = None
        self.o: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: J = None
        self.t: F = None
        self.r: D = None
        self.v: D = None
        self.u: H = None
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: E = None
        self.x: H = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: H = None
        self.o: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: E = None
        self.t: J = None
        self.o: D = None
        self.txt = txt

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

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

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

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