class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: H = None
        self.y: I = None
        self.w: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: E = None
        self.r: B = None
        self.o: I = None
        self.q: J = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: B = None
        self.o: C = None
        self.x: A = None
        self.p: H = None
        self.r: A = None
        self.w: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: H = None
        self.r: E = None
        self.p: J = None
        self.s: H = None
        self.w: E = None
        self.x: C = None
        self.t: C = None
        self.v: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: J = None
        self.s: D = None
        self.p: A = None
        self.u: E = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: E = None
        self.r: B = None
        self.o: I = None
        self.q: J = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: B = None
        self.o: C = None
        self.x: A = None
        self.p: H = None
        self.r: A = None
        self.w: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: H = None
        self.r: E = None
        self.p: J = None
        self.s: H = None
        self.w: E = None
        self.x: C = None
        self.t: C = None
        self.v: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: J = None
        self.s: D = None
        self.p: A = None
        self.u: E = None
        self.q: B = None
        self.txt = txt

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

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

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