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

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

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

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

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

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

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

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

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

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

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

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

l.s = i
l.v = k
l.y = e
e.w = a
e.r = j
a.t = e
a.y = l
i.r = l
i.t = l
j.z = k
j.v = b
j.t = i
b.r = l
b.t = l
k.z = j
k.v = b
k.t = b
assert k.z.v.t.y.r.z.txt == "k"