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

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

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

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

j = A("j")
f = B("f")
l = C("l")
n = D("n")
b = D("b")
e = D("e")
k = D("k")

j.z = f
f.y = l
f.v = l
f.q = l
l.t = f
n.u = f
n.s = k
b.u = f
b.s = k
e.u = f
e.s = b
k.u = f
k.s = b
assert f.y.t.q.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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

j = A("j")
f = B("f")
l = C("l")
n = D("n")
b = D("b")
e = D("e")
k = D("k")

j.z = f
f.y = l
f.v = l
f.q = l
l.t = f
n.u = f
n.s = k
b.u = f
b.s = k
e.u = f
e.s = b
k.u = f
k.s = b
assert f.y.t.q.t.y.txt == "l"