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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: D = None
        self.z: I = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: E = None
        self.v: I = None
        self.r: H = None
        self.u: A = None
        self.p: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: F = None
        self.z: D = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: J = None
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: G = None
        self.q: G = None
        self.txt = txt

n = A("n")
k = B("k")
m = C("m")
f = D("f")
d = E("d")
l = F("l")
h = G("h")
c = H("c")
a = I("a")
b = J("b")

n.s = m
n.w = a
n.o = a
n.z = a
n.x = h
n.y = d
n.p = k
n.r = b
k.z = h
k.q = h
k.s = a
k.y = a
k.x = a
k.u = a
k.r = f
k.o = b
k.p = b
k.w = m
m.t = l
m.p = f
m.z = a
m.x = k
f.x = l
f.s = d
f.p = d
f.v = a
f.r = c
f.u = n
d.r = a
d.u = m
d.z = m
d.q = c
d.y = k
d.v = h
d.o = h
l.y = m
l.q = d
l.v = n
l.s = n
l.x = b
l.p = b
l.r = c
l.z = c
l.t = k
h.v = d
h.u = d
h.y = l
h.z = f
c.o = f
c.t = h
a.z = c
a.s = b
a.t = l
b.z = n
b.p = h
b.q = h
assert c.t.y.t.p.q.u.y.u.t.p.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: I = None
        self.x: G = None
        self.y: E = None
        self.o: I = None
        self.p: B = None
        self.r: J = None
        self.z: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: D = None
        self.z: I = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: E = None
        self.v: I = None
        self.r: H = None
        self.u: A = None
        self.p: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: F = None
        self.z: D = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: J = None
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: G = None
        self.q: G = None
        self.txt = txt

n = A("n")
k = B("k")
m = C("m")
f = D("f")
d = E("d")
l = F("l")
h = G("h")
c = H("c")
a = I("a")
b = J("b")

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