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

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

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

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

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

m = A("m")
l = B("l")
f = C("f")
e = D("e")
a = E("a")
c = D("c")
j = D("j")
n = E("n")
g = A("g")

m.t = j
m.v = l
m.w = l
m.q = f
m.p = f
l.x = g
l.s = f
f.v = a
e.p = l
e.r = g
e.q = m
e.s = a
a.q = e
a.s = n
a.x = j
a.o = c
a.r = f
c.p = l
c.r = m
c.q = g
c.s = a
j.p = l
j.r = m
j.q = m
j.s = a
n.q = e
n.s = a
n.x = j
n.o = j
n.r = f
g.t = c
g.v = l
g.w = l
g.q = f
g.p = f
assert l.s.v.s.s.q.p.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: B = None
        self.q: C = None
        self.w: B = None
        self.p: C = None
        self.txt = txt

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

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

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

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

m = A("m")
l = B("l")
f = C("f")
e = D("e")
a = E("a")
c = D("c")
j = D("j")
n = E("n")
g = A("g")

m.t = j
m.v = l
m.w = l
m.q = f
m.p = f
l.x = g
l.s = f
f.v = a
e.p = l
e.r = g
e.q = m
e.s = a
a.q = e
a.s = n
a.x = j
a.o = c
a.r = f
c.p = l
c.r = m
c.q = g
c.s = a
j.p = l
j.r = m
j.q = m
j.s = a
n.q = e
n.s = a
n.x = j
n.o = j
n.r = f
g.t = c
g.v = l
g.w = l
g.q = f
g.p = f
assert l.s.v.s.s.q.p.txt == "l"