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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: A = None
        self.z: E = None
        self.t: D = None
        self.s: D = None
        self.txt = txt

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

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

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

k.w = a
k.y = g
k.s = g
k.x = f
f.p = i
f.z = i
n.w = f
n.x = a
n.z = b
n.t = i
n.s = i
i.v = g
b.w = d
b.y = l
b.u = l
b.p = l
b.s = e
a.w = k
a.y = k
a.s = g
a.x = f
g.w = k
g.y = a
g.s = a
g.x = f
l.w = f
l.x = g
l.z = b
l.t = e
l.s = i
d.w = b
d.y = l
d.u = l
d.p = l
d.s = e
e.v = g
assert n.t.v.x.z.v.w.s.txt == "
class A:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: A = None
        self.s: A = None
        self.x: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: A = None
        self.z: E = None
        self.t: D = None
        self.s: D = None
        self.txt = txt

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

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

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

k.w = a
k.y = g
k.s = g
k.x = f
f.p = i
f.z = i
n.w = f
n.x = a
n.z = b
n.t = i
n.s = i
i.v = g
b.w = d
b.y = l
b.u = l
b.p = l
b.s = e
a.w = k
a.y = k
a.s = g
a.x = f
g.w = k
g.y = a
g.s = a
g.x = f
l.w = f
l.x = g
l.z = b
l.t = e
l.s = i
d.w = b
d.y = l
d.u = l
d.p = l
d.s = e
e.v = g
assert n.t.v.x.z.v.w.s.txt == "g"