class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: F = None
        self.r: A = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.y: J = None
        self.x: H = None
        self.s: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: B = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: C = None
        self.z: D = None
        self.o: I = None
        self.v: D = None
        self.r: H = None
        self.y: H = None
        self.q: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: D = None
        self.w: D = None
        self.u: A = None
        self.t: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: F = None
        self.x: F = None
        self.p: I = None
        self.z: G = None
        self.v: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: F = None
        self.r: A = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.y: J = None
        self.x: H = None
        self.s: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: B = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: C = None
        self.z: D = None
        self.o: I = None
        self.v: D = None
        self.r: H = None
        self.y: H = None
        self.q: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: D = None
        self.w: D = None
        self.u: A = None
        self.t: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: F = None
        self.x: F = None
        self.p: I = None
        self.z: G = None
        self.v: D = None
        self.txt = txt

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

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