class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: C = None
        self.s: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: E = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: E = None
        self.z: B = None
        self.txt = txt

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

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