class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: F = None
        self.o: J = None
        self.t: I = None
        self.z: G = None
        self.u: F = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: E = None
        self.w: J = None
        self.y: G = None
        self.z: E = None
        self.t: B = None
        self.s: B = None
        self.p: A = None
        self.v: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: A = None
        self.r: J = None
        self.z: F = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: J = None
        self.s: A = None
        self.r: I = None
        self.v: B = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: E = None
        self.u: F = None
        self.r: J = None
        self.z: B = None
        self.w: J = None
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: B = None
        self.z: C = None
        self.o: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: F = None
        self.o: J = None
        self.t: I = None
        self.z: G = None
        self.u: F = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: E = None
        self.w: J = None
        self.y: G = None
        self.z: E = None
        self.t: B = None
        self.s: B = None
        self.p: A = None
        self.v: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: A = None
        self.r: J = None
        self.z: F = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: J = None
        self.s: A = None
        self.r: I = None
        self.v: B = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: E = None
        self.u: F = None
        self.r: J = None
        self.z: B = None
        self.w: J = None
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: B = None
        self.z: C = None
        self.o: D = None
        self.txt = txt

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

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