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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.w: H = None
        self.t: F = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: D = None
        self.w: I = None
        self.q: G = None
        self.p: C = None
        self.o: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: D = None
        self.u: E = None
        self.v: D = None
        self.p: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: C = None
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.w: H = None
        self.t: F = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: D = None
        self.w: I = None
        self.q: G = None
        self.p: C = None
        self.o: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: D = None
        self.u: E = None
        self.v: D = None
        self.p: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: C = None
        self.p: E = None
        self.txt = txt

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

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