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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: G = None
        self.r: E = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.t: D = None
        self.q: G = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: G = None
        self.r: E = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.t: D = None
        self.q: G = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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

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