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

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

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

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

l = A("l")
f = B("f")
j = C("j")
m = D("m")
i = B("i")
c = A("c")
b = A("b")

l.s = m
l.z = m
l.p = i
f.r = j
f.z = j
f.u = i
f.v = m
j.s = m
j.u = m
j.w = l
m.v = j
m.s = j
i.r = j
i.z = j
i.u = f
i.v = m
c.s = m
c.z = m
c.p = f
b.s = m
b.z = m
b.p = f
assert l.p.u.r.u.v.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: B = None
        self.z: D = None
        self.txt = txt

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

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

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

l = A("l")
f = B("f")
j = C("j")
m = D("m")
i = B("i")
c = A("c")
b = A("b")

l.s = m
l.z = m
l.p = i
f.r = j
f.z = j
f.u = i
f.v = m
j.s = m
j.u = m
j.w = l
m.v = j
m.s = j
i.r = j
i.z = j
i.u = f
i.v = m
c.s = m
c.z = m
c.p = f
b.s = m
b.z = m
b.p = f
assert l.p.u.r.u.v.txt == "j"