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

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

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

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

i = A("i")
n = B("n")
c = C("c")
k = D("k")
l = B("l")
a = D("a")
g = D("g")
b = C("b")
h = A("h")

i.v = h
i.y = l
i.o = b
n.r = l
c.w = g
c.z = g
k.u = l
k.o = g
k.z = g
l.r = n
a.u = l
a.o = k
a.z = g
g.u = l
g.o = k
g.z = k
b.w = a
b.z = a
h.v = i
h.y = n
h.o = c
assert c.w.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: B = None
        self.o: C = None
        self.txt = txt

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

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

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

i = A("i")
n = B("n")
c = C("c")
k = D("k")
l = B("l")
a = D("a")
g = D("g")
b = C("b")
h = A("h")

i.v = h
i.y = l
i.o = b
n.r = l
c.w = g
c.z = g
k.u = l
k.o = g
k.z = g
l.r = n
a.u = l
a.o = k
a.z = g
g.u = l
g.o = k
g.z = k
b.w = a
b.z = a
h.v = i
h.y = n
h.o = c
assert c.w.u.r.txt == "n"