class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: D = None
        self.x: H = None
        self.q: C = None
        self.u: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: J = None
        self.w: J = None
        self.q: I = None
        self.z: D = None
        self.t: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: H = None
        self.z: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: I = None
        self.y: F = None
        self.w: I = None
        self.p: J = None
        self.z: I = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: G = None
        self.t: A = None
        self.s: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: J = None
        self.w: J = None
        self.q: I = None
        self.z: D = None
        self.t: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: H = None
        self.z: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: I = None
        self.y: F = None
        self.w: I = None
        self.p: J = None
        self.z: I = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: G = None
        self.t: A = None
        self.s: D = None
        self.txt = txt

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

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

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