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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: B = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: B = None
        self.v: B = None
        self.t: B = None
        self.txt = txt

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

a = A("a")
l = B("l")
b = C("b")
k = D("k")
e = E("e")
i = B("i")

a.v = l
a.u = b
a.r = e
a.o = k
l.q = k
l.o = k
l.w = i
b.o = e
b.t = i
b.y = i
b.r = l
b.s = a
k.r = e
k.w = l
k.t = l
k.v = i
e.w = a
i.q = k
i.o = k
i.w = l
assert a.r.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: C = None
        self.r: E = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: B = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: B = None
        self.v: B = None
        self.t: B = None
        self.txt = txt

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

a = A("a")
l = B("l")
b = C("b")
k = D("k")
e = E("e")
i = B("i")

a.v = l
a.u = b
a.r = e
a.o = k
l.q = k
l.o = k
l.w = i
b.o = e
b.t = i
b.y = i
b.r = l
b.s = a
k.r = e
k.w = l
k.t = l
k.v = i
e.w = a
i.q = k
i.o = k
i.w = l
assert a.r.w.u.txt == "b"