class A:
    def __init__(self, txt: str):
        self.u: J = None
        self.o: B = None
        self.w: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: F = None
        self.s: C = None
        self.w: C = None
        self.z: C = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: C = None
        self.o: D = None
        self.w: C = None
        self.p: E = None
        self.x: E = None
        self.s: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: F = None
        self.s: C = None
        self.w: C = None
        self.z: C = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: C = None
        self.o: D = None
        self.w: C = None
        self.p: E = None
        self.x: E = None
        self.s: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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