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

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

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

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

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

c = A("c")
g = B("g")
n = C("n")
e = D("e")
a = E("a")
i = D("i")
k = A("k")
d = E("d")
f = D("f")

c.z = e
c.p = g
c.t = g
g.x = k
n.r = c
n.w = f
n.q = e
n.o = e
e.t = f
e.r = i
e.w = n
e.s = a
a.s = e
a.u = f
i.t = e
i.r = f
i.w = n
i.s = a
k.z = e
k.p = g
k.t = g
d.s = f
d.u = i
f.t = i
f.r = i
f.w = n
f.s = d
assert a.u.w.w.t.t.w.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: B = None
        self.t: B = None
        self.txt = txt

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

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

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

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

c = A("c")
g = B("g")
n = C("n")
e = D("e")
a = E("a")
i = D("i")
k = A("k")
d = E("d")
f = D("f")

c.z = e
c.p = g
c.t = g
g.x = k
n.r = c
n.w = f
n.q = e
n.o = e
e.t = f
e.r = i
e.w = n
e.s = a
a.s = e
a.u = f
i.t = e
i.r = f
i.w = n
i.s = a
k.z = e
k.p = g
k.t = g
d.s = f
d.u = i
f.t = i
f.r = i
f.w = n
f.s = d
assert a.u.w.w.t.t.w.w.w.txt == "n"