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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: F = None
        self.v: F = None
        self.y: I = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: J = None
        self.p: E = None
        self.x: C = None
        self.r: D = None
        self.w: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: G = None
        self.z: A = None
        self.o: A = None
        self.s: A = None
        self.w: G = None
        self.r: G = None
        self.u: C = None
        self.v: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: F = None
        self.v: F = None
        self.y: I = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: J = None
        self.p: E = None
        self.x: C = None
        self.r: D = None
        self.w: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: G = None
        self.z: A = None
        self.o: A = None
        self.s: A = None
        self.w: G = None
        self.r: G = None
        self.u: C = None
        self.v: G = None
        self.txt = txt

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

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