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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: D = None
        self.p: C = None
        self.txt = txt

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

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

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

l = A("l")
a = B("a")
i = C("i")
d = D("d")
n = E("n")

l.z = a
l.w = d
l.v = n
l.p = n
l.u = n
a.o = i
a.p = i
a.z = d
i.y = a
d.u = a
d.t = a
d.o = l
n.w = l
n.u = l
assert i.y.o.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: D = None
        self.v: E = None
        self.p: E = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: D = None
        self.p: C = None
        self.txt = txt

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

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

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

l = A("l")
a = B("a")
i = C("i")
d = D("d")
n = E("n")

l.z = a
l.w = d
l.v = n
l.p = n
l.u = n
a.o = i
a.p = i
a.z = d
i.y = a
d.u = a
d.t = a
d.o = l
n.w = l
n.u = l
assert i.y.o.y.txt == "a"