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

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

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

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

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

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

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

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

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

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

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

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

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