class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: A = None
        self.z: A = None
        self.q: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: A = None
        self.o: D = None
        self.w: C = None
        self.y: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: A = None
        self.t: C = None
        self.y: A = None
        self.w: C = None
        self.txt = txt

k = A("k")
e = B("e")
d = C("d")
j = D("j")
n = E("n")
i = A("i")

k.s = d
k.o = i
k.z = i
k.q = i
e.t = n
e.s = k
e.y = k
e.o = j
e.w = d
d.z = j
j.q = d
j.x = e
j.s = e
j.t = e
j.p = k
n.q = k
n.r = i
n.y = i
n.t = d
n.w = d
i.s = d
i.o = k
i.z = k
i.q = k
assert d.z.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: A = None
        self.z: A = None
        self.q: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: A = None
        self.o: D = None
        self.w: C = None
        self.y: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: A = None
        self.t: C = None
        self.y: A = None
        self.w: C = None
        self.txt = txt

k = A("k")
e = B("e")
d = C("d")
j = D("j")
n = E("n")
i = A("i")

k.s = d
k.o = i
k.z = i
k.q = i
e.t = n
e.s = k
e.y = k
e.o = j
e.w = d
d.z = j
j.q = d
j.x = e
j.s = e
j.t = e
j.p = k
n.q = k
n.r = i
n.y = i
n.t = d
n.w = d
i.s = d
i.o = k
i.z = k
i.q = k
assert d.z.t.t.txt == "n"