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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: A = None
        self.p: C = None
        self.x: A = None
        self.y: J = None
        self.r: A = None
        self.w: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: B = None
        self.x: C = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: F = None
        self.p: I = None
        self.z: C = None
        self.v: J = None
        self.t: H = None
        self.y: C = None
        self.x: E = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: F = None
        self.q: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: A = None
        self.w: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: A = None
        self.p: C = None
        self.x: A = None
        self.y: J = None
        self.r: A = None
        self.w: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: B = None
        self.x: C = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: F = None
        self.p: I = None
        self.z: C = None
        self.v: J = None
        self.t: H = None
        self.y: C = None
        self.x: E = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: F = None
        self.q: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: A = None
        self.w: B = None
        self.txt = txt

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

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