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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: C = None
        self.t: D = None
        self.z: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: A = None
        self.z: A = None
        self.s: E = None
        self.txt = txt

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

g.v = l
g.u = a
g.r = a
k.z = l
k.u = d
k.o = d
k.x = b
b.s = a
b.u = h
b.z = h
b.t = e
a.q = m
a.u = k
l.o = g
l.x = g
l.z = g
l.s = m
h.s = e
h.t = e
h.u = b
h.z = b
m.o = g
m.x = g
m.z = g
m.s = l
d.z = m
d.u = k
d.o = k
d.x = b
e.q = l
e.u = d
assert l.s.z.u.u.u.x.t.q.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: D = None
        self.r: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: C = None
        self.t: D = None
        self.z: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: A = None
        self.z: A = None
        self.s: E = None
        self.txt = txt

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

g.v = l
g.u = a
g.r = a
k.z = l
k.u = d
k.o = d
k.x = b
b.s = a
b.u = h
b.z = h
b.t = e
a.q = m
a.u = k
l.o = g
l.x = g
l.z = g
l.s = m
h.s = e
h.t = e
h.u = b
h.z = b
m.o = g
m.x = g
m.z = g
m.s = l
d.z = m
d.u = k
d.o = k
d.x = b
e.q = l
e.u = d
assert l.s.z.u.u.u.x.t.q.txt == "l"