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

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

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

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

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

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

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

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

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

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

n.z = h
n.v = e
n.y = c
i.u = j
l.q = i
l.o = j
l.w = c
h.z = i
h.v = i
h.s = n
k.q = i
k.o = l
k.w = j
j.q = i
j.o = k
j.w = k
e.z = i
e.v = i
e.s = n
c.q = i
c.o = j
c.w = k
assert k.w.q.u.w.o.o.q.txt == "i"