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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: A = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: J = None
        self.r: C = None
        self.p: C = None
        self.y: J = None
        self.u: I = None
        self.q: C = None
        self.x: D = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: E = None
        self.u: I = None
        self.z: I = None
        self.y: I = None
        self.t: A = None
        self.r: A = None
        self.p: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: B = None
        self.y: D = None
        self.u: H = None
        self.z: H = None
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: A = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: J = None
        self.r: C = None
        self.p: C = None
        self.y: J = None
        self.u: I = None
        self.q: C = None
        self.x: D = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: E = None
        self.u: I = None
        self.z: I = None
        self.y: I = None
        self.t: A = None
        self.r: A = None
        self.p: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: B = None
        self.y: D = None
        self.u: H = None
        self.z: H = None
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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