class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: E = None
        self.s: F = None
        self.u: D = None
        self.q: D = None
        self.z: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.s: G = None
        self.o: J = None
        self.q: C = None
        self.y: B = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: I = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: A = None
        self.x: A = None
        self.o: C = None
        self.z: H = None
        self.t: J = None
        self.p: J = None
        self.u: J = None
        self.txt = txt

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

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

j.v = b
j.t = i
j.s = k
j.u = h
j.q = h
j.z = a
b.z = e
b.r = i
b.w = c
b.p = c
b.y = h
b.u = m
b.x = m
b.s = k
f.y = m
f.q = h
h.p = e
h.o = e
h.s = c
h.q = f
h.y = b
h.r = m
i.y = j
i.v = a
i.s = h
k.w = f
c.t = i
c.z = b
c.o = e
c.u = k
c.s = j
c.w = j
c.p = f
m.p = b
m.v = a
a.v = b
a.q = j
a.x = j
a.o = f
a.z = m
a.t = e
a.p = e
a.u = e
e.y = b
e.p = b
e.o = c
e.w = c
e.s = k
e.t = a
e.u = f
assert b.r.s.o.s.w.q.s.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: E = None
        self.s: F = None
        self.u: D = None
        self.q: D = None
        self.z: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.s: G = None
        self.o: J = None
        self.q: C = None
        self.y: B = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: I = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: A = None
        self.x: A = None
        self.o: C = None
        self.z: H = None
        self.t: J = None
        self.p: J = None
        self.u: J = None
        self.txt = txt

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

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

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