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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: B = None
        self.z: F = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: J = None
        self.s: J = None
        self.r: E = None
        self.p: E = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: G = None
        self.p: H = None
        self.t: D = None
        self.w: I = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: I = None
        self.u: G = None
        self.w: D = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: A = None
        self.w: B = None
        self.u: C = None
        self.z: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: B = None
        self.z: F = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: J = None
        self.s: J = None
        self.r: E = None
        self.p: E = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: G = None
        self.p: H = None
        self.t: D = None
        self.w: I = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: I = None
        self.u: G = None
        self.w: D = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: A = None
        self.w: B = None
        self.u: C = None
        self.z: C = None
        self.txt = txt

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

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