class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: E = None
        self.s: B = None
        self.v: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: A = None
        self.o: E = None
        self.s: D = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: A = None
        self.o: E = None
        self.s: D = None
        self.t: B = None
        self.txt = txt

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

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

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