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

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

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

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

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

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

e.v = d
e.t = j
b.y = h
b.s = l
b.o = l
b.r = i
b.u = j
i.u = b
n.q = h
n.s = b
n.w = b
j.q = b
j.r = i
l.u = b
a.v = l
a.t = j
d.u = b
h.q = n
h.s = b
h.w = b
assert e.v.u.u.r.u.u.r.u.s.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

e.v = d
e.t = j
b.y = h
b.s = l
b.o = l
b.r = i
b.u = j
i.u = b
n.q = h
n.s = b
n.w = b
j.q = b
j.r = i
l.u = b
a.v = l
a.t = j
d.u = b
h.q = n
h.s = b
h.w = b
assert e.v.u.u.r.u.u.r.u.s.txt == "l"