class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: C = None
        self.o: D = None
        self.u: J = None
        self.p: H = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: C = None
        self.y: D = None
        self.r: C = None
        self.t: F = None
        self.o: C = None
        self.p: E = None
        self.z: F = None
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: F = None
        self.r: H = None
        self.z: F = None
        self.t: I = None
        self.s: D = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: J = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: I = None
        self.x: I = None
        self.q: F = None
        self.u: I = None
        self.r: I = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: C = None
        self.y: D = None
        self.r: C = None
        self.t: F = None
        self.o: C = None
        self.p: E = None
        self.z: F = None
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: F = None
        self.r: H = None
        self.z: F = None
        self.t: I = None
        self.s: D = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: J = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: I = None
        self.x: I = None
        self.q: F = None
        self.u: I = None
        self.r: I = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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