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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: D = None
        self.x: D = None
        self.p: D = None
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: A = None
        self.z: E = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: E = None
        self.z: F = None
        self.r: J = None
        self.v: I = None
        self.x: A = None
        self.q: E = None
        self.y: E = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: J = None
        self.u: B = None
        self.v: J = None
        self.z: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: D = None
        self.x: D = None
        self.p: D = None
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: A = None
        self.z: E = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: E = None
        self.z: F = None
        self.r: J = None
        self.v: I = None
        self.x: A = None
        self.q: E = None
        self.y: E = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: J = None
        self.u: B = None
        self.v: J = None
        self.z: C = None
        self.txt = txt

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

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

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