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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: D = None
        self.s: E = None
        self.x: C = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: D = None
        self.s: E = None
        self.x: C = None
        self.o: D = None
        self.txt = txt

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

b.p = c
b.v = i
b.t = g
b.y = g
b.z = n
m.s = l
m.u = g
m.t = g
c.s = l
c.r = l
c.x = g
c.q = h
c.u = d
g.v = i
g.t = d
g.x = l
l.p = n
l.w = g
l.o = g
l.s = i
l.x = c
i.p = b
i.w = g
i.o = g
i.s = l
i.x = c
h.s = l
h.u = g
h.t = g
d.p = c
d.v = l
d.t = g
d.y = g
d.z = b
n.p = c
n.v = l
n.t = g
n.y = g
n.z = b
assert l.p.t.v.w.v.w.x.w.x.txt == "l"