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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: F = None
        self.p: F = None
        self.s: J = None
        self.x: A = None
        self.q: E = None
        self.y: F = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: I = None
        self.r: B = None
        self.v: F = None
        self.t: J = None
        self.y: D = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: D = None
        self.p: C = None
        self.z: C = None
        self.y: H = None
        self.o: C = None
        self.v: H = None
        self.s: F = None
        self.t: H = None
        self.r: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: D = None
        self.x: A = None
        self.y: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: G = None
        self.v: D = None
        self.s: J = None
        self.r: D = None
        self.x: G = None
        self.q: B = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: D = None
        self.z: G = None
        self.v: G = None
        self.o: C = None
        self.y: I = None
        self.r: C = None
        self.q: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: F = None
        self.p: F = None
        self.s: J = None
        self.x: A = None
        self.q: E = None
        self.y: F = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: I = None
        self.r: B = None
        self.v: F = None
        self.t: J = None
        self.y: D = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: D = None
        self.p: C = None
        self.z: C = None
        self.y: H = None
        self.o: C = None
        self.v: H = None
        self.s: F = None
        self.t: H = None
        self.r: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: D = None
        self.x: A = None
        self.y: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: G = None
        self.v: D = None
        self.s: J = None
        self.r: D = None
        self.x: G = None
        self.q: B = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: D = None
        self.z: G = None
        self.v: G = None
        self.o: C = None
        self.y: I = None
        self.r: C = None
        self.q: G = None
        self.txt = txt

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

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