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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: A = None
        self.x: G = None
        self.z: B = None
        self.q: I = None
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: G = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: H = None
        self.x: I = None
        self.u: A = None
        self.t: G = None
        self.r: J = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: J = None
        self.r: J = None
        self.x: D = None
        self.t: E = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: A = None
        self.w: E = None
        self.p: B = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: A = None
        self.x: G = None
        self.z: B = None
        self.q: I = None
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: G = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: H = None
        self.x: I = None
        self.u: A = None
        self.t: G = None
        self.r: J = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: J = None
        self.r: J = None
        self.x: D = None
        self.t: E = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: A = None
        self.w: E = None
        self.p: B = None
        self.s: C = None
        self.txt = txt

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

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

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

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