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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: A = None
        self.x: C = None
        self.r: A = None
        self.z: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: J = None
        self.w: E = None
        self.z: A = None
        self.t: C = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: A = None
        self.x: C = None
        self.r: A = None
        self.z: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: J = None
        self.w: E = None
        self.z: A = None
        self.t: C = None
        self.x: E = None
        self.txt = txt

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

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

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

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