class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: D = None
        self.v: H = None
        self.r: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: G = None
        self.w: I = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: D = None
        self.w: E = None
        self.s: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: H = None
        self.r: D = None
        self.t: G = None
        self.z: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: G = None
        self.w: I = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: D = None
        self.w: E = None
        self.s: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: H = None
        self.r: D = None
        self.t: G = None
        self.z: I = None
        self.txt = txt

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

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