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

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

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

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

i = A("i")
m = B("m")
e = C("e")
k = D("k")
l = A("l")
h = D("h")
c = A("c")
j = B("j")

i.u = h
i.y = h
i.s = k
m.y = e
m.x = h
e.w = h
e.t = h
e.v = i
e.q = m
k.v = h
k.z = h
k.q = h
k.p = c
l.u = k
l.s = k
l.y = h
h.v = k
h.z = k
h.q = k
h.p = c
c.u = h
c.y = h
c.s = h
j.y = e
j.x = k
assert e.v.s.z.p.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: D = None
        self.s: D = None
        self.txt = txt

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

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

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

i = A("i")
m = B("m")
e = C("e")
k = D("k")
l = A("l")
h = D("h")
c = A("c")
j = B("j")

i.u = h
i.y = h
i.s = k
m.y = e
m.x = h
e.w = h
e.t = h
e.v = i
e.q = m
k.v = h
k.z = h
k.q = h
k.p = c
l.u = k
l.s = k
l.y = h
h.v = k
h.z = k
h.q = k
h.p = c
c.u = h
c.y = h
c.s = h
j.y = e
j.x = k
assert e.v.s.z.p.txt == "c"