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

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

class C:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: A = None
        self.s: A = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: A = None
        self.s: A = None
        self.p: C = None
        self.txt = txt

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

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

n.w = j
n.z = c
n.o = b
e.t = a
e.x = l
e.y = j
c.z = l
c.p = l
c.r = b
c.s = n
i.o = l
l.z = c
l.p = c
l.r = n
l.s = b
m.t = e
m.x = c
m.y = j
f.t = e
f.x = c
f.y = i
a.t = m
a.x = l
a.y = j
j.o = l
b.w = i
b.z = l
b.o = n
assert i.o.p.r.w.o.s.z.s.z.z.txt == "c"