class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: J = None
        self.w: B = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: E = None
        self.p: J = None
        self.o: H = None
        self.u: C = None
        self.q: G = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: J = None
        self.q: F = None
        self.w: D = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: I = None
        self.z: I = None
        self.o: B = None
        self.q: J = None
        self.x: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: J = None
        self.w: B = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: E = None
        self.p: J = None
        self.o: H = None
        self.u: C = None
        self.q: G = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: J = None
        self.q: F = None
        self.w: D = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: I = None
        self.z: I = None
        self.o: B = None
        self.q: J = None
        self.x: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: E = None
        self.txt = txt

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

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