class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: B = None
        self.q: H = None
        self.s: J = None
        self.u: J = None
        self.x: B = None
        self.z: E = None
        self.y: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: A = None
        self.r: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: G = None
        self.y: D = None
        self.o: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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

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

b = A("b")
m = B("m")
f = C("f")
l = D("l")
i = E("i")
n = F("n")
h = G("h")
k = H("k")
g = I("g")
e = J("e")

b.o = k
b.q = k
b.y = k
b.r = m
b.x = m
b.s = e
b.u = e
b.z = i
m.u = l
m.r = f
m.q = f
m.t = f
m.o = f
m.s = h
m.v = k
m.p = k
m.y = n
f.s = e
f.z = b
f.r = g
l.x = b
l.s = m
l.q = g
l.p = g
l.r = g
l.w = f
l.v = e
l.t = e
i.t = n
i.s = m
n.u = i
n.t = h
n.y = l
n.o = e
h.z = n
k.q = f
k.o = n
g.t = f
g.x = k
g.u = k
g.s = k
g.r = b
g.y = i
g.q = m
g.z = n
g.p = n
g.v = l
e.q = m
e.z = g
e.s = k
assert m.s.z.y.t.q.s.z.y.w.s.txt == "
class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: B = None
        self.q: H = None
        self.s: J = None
        self.u: J = None
        self.x: B = None
        self.z: E = None
        self.y: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: A = None
        self.r: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: G = None
        self.y: D = None
        self.o: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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

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

b = A("b")
m = B("m")
f = C("f")
l = D("l")
i = E("i")
n = F("n")
h = G("h")
k = H("k")
g = I("g")
e = J("e")

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