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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: E = None
        self.w: B = None
        self.r: B = None
        self.u: G = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: J = None
        self.z: J = None
        self.s: H = None
        self.v: C = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: D = None
        self.o: B = None
        self.x: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: E = None
        self.w: B = None
        self.r: B = None
        self.u: G = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: J = None
        self.z: J = None
        self.s: H = None
        self.v: C = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: D = None
        self.o: B = None
        self.x: C = None
        self.txt = txt

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

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

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

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