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

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: J = None
        self.r: A = None
        self.p: E = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: E = None
        self.x: G = None
        self.y: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: H = None
        self.r: I = None
        self.y: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: J = None
        self.r: A = None
        self.p: E = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: E = None
        self.x: G = None
        self.y: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: H = None
        self.r: I = None
        self.y: H = None
        self.txt = txt

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

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