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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

a = A("a")
l = B("l")
h = C("h")
i = D("i")
n = E("n")
j = C("j")
c = C("c")

a.u = n
a.o = i
a.z = i
a.w = i
l.v = c
l.w = a
h.s = a
h.r = c
h.o = n
i.s = n
i.z = n
i.y = l
n.s = l
j.s = a
j.r = h
j.o = n
c.s = a
c.r = j
c.o = n
assert l.w.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: D = None
        self.z: D = None
        self.w: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

a = A("a")
l = B("l")
h = C("h")
i = D("i")
n = E("n")
j = C("j")
c = C("c")

a.u = n
a.o = i
a.z = i
a.w = i
l.v = c
l.w = a
h.s = a
h.r = c
h.o = n
i.s = n
i.z = n
i.y = l
n.s = l
j.s = a
j.r = h
j.o = n
c.s = a
c.r = j
c.o = n
assert l.w.o.s.txt == "n"