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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: D = None
        self.x: A = None
        self.q: B = None
        self.txt = txt

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

l = A("l")
i = B("i")
f = C("f")
k = D("k")

l.t = f
l.z = f
l.v = i
i.s = k
f.r = k
f.o = k
f.x = l
f.q = i
k.u = f
k.w = l
k.x = i
assert f.q.s.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: B = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: D = None
        self.x: A = None
        self.q: B = None
        self.txt = txt

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

l = A("l")
i = B("i")
f = C("f")
k = D("k")

l.t = f
l.z = f
l.v = i
i.s = k
f.r = k
f.o = k
f.x = l
f.q = i
k.u = f
k.w = l
k.x = i
assert f.q.s.w.t.txt == "f"