class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

l.v = e
l.r = n
h.w = n
h.r = c
n.x = h
n.u = h
n.s = l
n.w = l
n.q = c
c.y = d
c.o = k
e.y = k
e.s = h
e.v = g
k.x = h
k.u = h
k.s = l
k.w = l
k.q = d
m.y = d
m.o = k
d.y = c
d.o = k
g.v = e
g.r = k
b.y = c
b.o = n
assert d.y.y.y.y.o.u.w.s.r.txt == "n"