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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: E = None
        self.s: C = None
        self.o: E = None
        self.txt = txt

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

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

e.y = l
e.s = k
k.w = i
k.q = i
k.z = e
j.r = d
d.w = i
d.x = i
d.s = j
d.o = l
l.v = e
l.u = k
i.v = e
i.u = k
assert l.u.q.v.y.u.w.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: E = None
        self.s: C = None
        self.o: E = None
        self.txt = txt

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

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

e.y = l
e.s = k
k.w = i
k.q = i
k.z = e
j.r = d
d.w = i
d.x = i
d.s = j
d.o = l
l.v = e
l.u = k
i.v = e
i.u = k
assert l.u.q.v.y.u.w.txt == "i"