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

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

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

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

a = A("a")
i = B("i")
g = C("g")
j = D("j")
e = B("e")
l = C("l")

a.w = e
a.v = e
a.u = g
i.s = j
i.w = l
g.z = j
g.v = a
g.y = a
g.t = i
j.q = e
j.z = l
e.s = j
e.w = g
l.z = j
l.v = a
l.y = a
l.t = e
assert l.v.w.w.t.s.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: B = None
        self.u: C = None
        self.txt = txt

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

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

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

a = A("a")
i = B("i")
g = C("g")
j = D("j")
e = B("e")
l = C("l")

a.w = e
a.v = e
a.u = g
i.s = j
i.w = l
g.z = j
g.v = a
g.y = a
g.t = i
j.q = e
j.z = l
e.s = j
e.w = g
l.z = j
l.v = a
l.y = a
l.t = e
assert l.v.w.w.t.s.txt == "j"