class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: B = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

l.u = c
l.z = k
l.x = i
b.z = l
b.u = k
c.u = b
c.s = i
i.y = c
e.v = i
e.q = i
e.t = c
e.w = l
k.z = l
k.u = b
assert i.y.s.y.u.txt == "b"