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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: G = None
        self.o: B = None
        self.z: H = None
        self.w: E = None
        self.x: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: A = None
        self.v: F = None
        self.x: D = None
        self.o: D = None
        self.w: D = None
        self.r: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: G = None
        self.o: B = None
        self.z: H = None
        self.w: E = None
        self.x: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: A = None
        self.v: F = None
        self.x: D = None
        self.o: D = None
        self.w: D = None
        self.r: D = None
        self.txt = txt

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

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

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