class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: D = None
        self.w: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: E = None
        self.w: D = None
        self.s: F = None
        self.y: D = None
        self.r: F = None
        self.u: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: H = None
        self.o: H = None
        self.z: E = None
        self.w: J = None
        self.s: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: E = None
        self.x: D = None
        self.txt = txt

k = A("k")
n = B("n")
d = C("d")
g = D("g")
i = E("i")
m = F("m")
f = G("f")
b = H("b")
j = I("j")
c = J("c")

k.x = i
k.z = i
k.v = i
n.t = k
n.x = g
n.w = c
d.w = i
d.q = j
d.p = j
d.o = k
d.r = b
d.s = b
d.z = n
d.x = g
d.t = g
d.v = m
g.o = k
i.z = j
m.q = i
m.p = g
f.o = d
f.t = i
f.w = g
f.y = g
f.s = m
f.r = m
f.u = c
b.t = f
b.w = f
b.o = c
b.p = c
b.s = g
b.q = g
b.y = k
b.u = j
b.v = i
b.z = i
j.x = d
j.r = b
j.o = b
j.z = i
j.w = c
j.s = c
c.t = i
c.v = i
c.x = g
assert m.p.o.v.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: D = None
        self.w: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: E = None
        self.w: D = None
        self.s: F = None
        self.y: D = None
        self.r: F = None
        self.u: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: H = None
        self.o: H = None
        self.z: E = None
        self.w: J = None
        self.s: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: E = None
        self.x: D = None
        self.txt = txt

k = A("k")
n = B("n")
d = C("d")
g = D("g")
i = E("i")
m = F("m")
f = G("f")
b = H("b")
j = I("j")
c = J("c")

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