class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: C = None
        self.x: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: D = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: A = None
        self.t: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: A = None
        self.o: B = None
        self.txt = txt

e = A("e")
k = B("k")
b = C("b")
f = D("f")
a = C("a")
l = D("l")
i = C("i")
d = B("d")
m = A("m")
n = C("n")

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

class B:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: D = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: A = None
        self.t: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: A = None
        self.o: B = None
        self.txt = txt

e = A("e")
k = B("k")
b = C("b")
f = D("f")
a = C("a")
l = D("l")
i = C("i")
d = B("d")
m = A("m")
n = C("n")

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