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

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

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

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

j = A("j")
c = B("c")
n = C("n")
f = D("f")
i = D("i")
l = C("l")
e = A("e")
k = C("k")
a = A("a")

j.w = i
j.u = a
j.s = k
c.q = i
c.p = e
c.y = n
n.z = l
n.t = f
f.s = a
f.w = c
f.p = e
i.s = a
i.w = c
i.p = j
l.z = k
l.t = i
e.w = i
e.u = a
e.s = n
k.z = l
k.t = i
a.w = i
a.u = e
a.s = k
assert i.w.p.u.s.z.z.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: A = None
        self.s: C = None
        self.txt = txt

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

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

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

j = A("j")
c = B("c")
n = C("n")
f = D("f")
i = D("i")
l = C("l")
e = A("e")
k = C("k")
a = A("a")

j.w = i
j.u = a
j.s = k
c.q = i
c.p = e
c.y = n
n.z = l
n.t = f
f.s = a
f.w = c
f.p = e
i.s = a
i.w = c
i.p = j
l.z = k
l.t = i
e.w = i
e.u = a
e.s = n
k.z = l
k.t = i
a.w = i
a.u = e
a.s = k
assert i.w.p.u.s.z.z.z.z.txt == "k"