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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: D = None
        self.q: J = None
        self.s: J = None
        self.u: I = None
        self.p: I = None
        self.t: D = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: B = None
        self.s: D = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: C = None
        self.z: H = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: A = None
        self.y: G = None
        self.q: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: J = None
        self.s: E = None
        self.v: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: D = None
        self.q: J = None
        self.s: J = None
        self.u: I = None
        self.p: I = None
        self.t: D = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: B = None
        self.s: D = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: C = None
        self.z: H = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: A = None
        self.y: G = None
        self.q: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: J = None
        self.s: E = None
        self.v: G = None
        self.txt = txt

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

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

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