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

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

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

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

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

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

n.w = e
n.s = k
n.v = i
g.p = m
l.r = e
l.p = k
l.x = m
j.u = i
j.v = l
j.y = c
j.w = n
i.t = n
i.r = n
i.u = c
c.u = i
c.v = l
c.y = j
c.w = n
k.p = m
m.r = i
m.p = k
m.x = l
e.t = n
e.r = n
e.u = c
assert m.r.u.w.s.p.p.p.p.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: B = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

n.w = e
n.s = k
n.v = i
g.p = m
l.r = e
l.p = k
l.x = m
j.u = i
j.v = l
j.y = c
j.w = n
i.t = n
i.r = n
i.u = c
c.u = i
c.v = l
c.y = j
c.w = n
k.p = m
m.r = i
m.p = k
m.x = l
e.t = n
e.r = n
e.u = c
assert m.r.u.w.s.p.p.p.p.txt == "k"