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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: D = None
        self.z: E = None
        self.o: J = None
        self.u: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: A = None
        self.o: G = None
        self.q: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: D = None
        self.z: E = None
        self.o: J = None
        self.u: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: A = None
        self.o: G = None
        self.q: H = None
        self.txt = txt

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

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