class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: G = None
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: I = None
        self.t: J = None
        self.x: F = None
        self.z: D = None
        self.o: D = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: C = None
        self.s: J = None
        self.y: A = None
        self.r: C = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: J = None
        self.z: C = None
        self.r: F = None
        self.x: C = None
        self.y: B = None
        self.t: A = None
        self.v: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: I = None
        self.t: J = None
        self.x: F = None
        self.z: D = None
        self.o: D = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: C = None
        self.s: J = None
        self.y: A = None
        self.r: C = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: J = None
        self.z: C = None
        self.r: F = None
        self.x: C = None
        self.y: B = None
        self.t: A = None
        self.v: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: E = None
        self.txt = txt

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

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

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