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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.x: B = None
        self.v: D = None
        self.txt = txt

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

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

n = A("n")
e = B("e")
a = C("a")
h = D("h")
c = E("c")
g = E("g")
l = E("l")
d = E("d")
b = E("b")

n.u = e
n.s = g
e.o = n
a.s = e
a.x = e
a.u = n
a.v = h
h.u = a
h.y = a
h.o = b
c.x = e
c.w = d
c.v = h
c.s = h
c.t = a
g.x = e
g.w = d
g.v = h
g.s = h
g.t = a
l.x = e
l.w = c
l.v = h
l.s = h
l.t = a
d.x = e
d.w = l
d.v = h
d.s = h
d.t = a
b.x = e
b.w = g
b.v = h
b.s = h
b.t = a
assert l.x.o.u.o.s.w.w.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.x: B = None
        self.v: D = None
        self.txt = txt

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

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

n = A("n")
e = B("e")
a = C("a")
h = D("h")
c = E("c")
g = E("g")
l = E("l")
d = E("d")
b = E("b")

n.u = e
n.s = g
e.o = n
a.s = e
a.x = e
a.u = n
a.v = h
h.u = a
h.y = a
h.o = b
c.x = e
c.w = d
c.v = h
c.s = h
c.t = a
g.x = e
g.w = d
g.v = h
g.s = h
g.t = a
l.x = e
l.w = c
l.v = h
l.s = h
l.t = a
d.x = e
d.w = l
d.v = h
d.s = h
d.t = a
b.x = e
b.w = g
b.v = h
b.s = h
b.t = a
assert l.x.o.u.o.s.w.w.w.w.txt == "d"