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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: E = None
        self.y: E = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: B = None
        self.u: A = None
        self.z: C = None
        self.o: A = None
        self.txt = txt

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

n.y = c
n.t = c
n.w = e
i.v = e
i.o = c
i.s = j
i.u = n
c.o = n
e.p = n
e.q = n
e.t = j
e.y = j
j.v = n
j.u = n
j.o = n
j.y = i
j.z = c
assert e.y.v.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: D = None
        self.t: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: E = None
        self.y: E = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: B = None
        self.u: A = None
        self.z: C = None
        self.o: A = None
        self.txt = txt

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

n.y = c
n.t = c
n.w = e
i.v = e
i.o = c
i.s = j
i.u = n
c.o = n
e.p = n
e.q = n
e.t = j
e.y = j
j.v = n
j.u = n
j.o = n
j.y = i
j.z = c
assert e.y.v.t.o.txt == "n"