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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: C = None
        self.w: H = None
        self.t: I = None
        self.p: H = None
        self.q: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: G = None
        self.x: B = None
        self.r: B = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: I = None
        self.z: D = None
        self.v: A = None
        self.t: G = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: B = None
        self.v: C = None
        self.t: E = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: J = None
        self.x: F = None
        self.p: E = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: E = None
        self.v: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: C = None
        self.w: H = None
        self.t: I = None
        self.p: H = None
        self.q: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: G = None
        self.x: B = None
        self.r: B = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: I = None
        self.z: D = None
        self.v: A = None
        self.t: G = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: B = None
        self.v: C = None
        self.t: E = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: J = None
        self.x: F = None
        self.p: E = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: E = None
        self.v: C = None
        self.txt = txt

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

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

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