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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: A = None
        self.s: J = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: A = None
        self.u: A = None
        self.o: C = None
        self.y: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: A = None
        self.s: J = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: A = None
        self.u: A = None
        self.o: C = None
        self.y: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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