class A:
    def __init__(self, txt: str):
        self.p: J = None
        self.q: F = None
        self.t: C = None
        self.y: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: B = None
        self.y: G = None
        self.x: B = None
        self.z: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: H = None
        self.t: F = None
        self.w: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.z: H = None
        self.r: E = None
        self.w: B = None
        self.x: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: F = None
        self.s: D = None
        self.y: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: B = None
        self.y: G = None
        self.x: B = None
        self.z: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: H = None
        self.t: F = None
        self.w: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.z: H = None
        self.r: E = None
        self.w: B = None
        self.x: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: F = None
        self.s: D = None
        self.y: A = None
        self.txt = txt

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

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