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

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

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

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

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

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

d.s = n
d.x = l
d.r = a
d.q = e
n.p = c
n.s = b
n.u = l
c.w = e
c.z = m
c.q = i
m.z = n
m.u = n
m.w = b
b.v = a
b.x = d
e.p = i
e.s = b
e.u = b
g.w = e
g.z = m
g.q = i
a.s = n
a.x = b
a.r = d
a.q = e
l.v = d
l.x = a
i.w = e
i.z = m
i.q = g
assert m.w.x.r.s.s.v.r.s.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: E = None
        self.r: A = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

d.s = n
d.x = l
d.r = a
d.q = e
n.p = c
n.s = b
n.u = l
c.w = e
c.z = m
c.q = i
m.z = n
m.u = n
m.w = b
b.v = a
b.x = d
e.p = i
e.s = b
e.u = b
g.w = e
g.z = m
g.q = i
a.s = n
a.x = b
a.r = d
a.q = e
l.v = d
l.x = a
i.w = e
i.z = m
i.q = g
assert m.w.x.r.s.s.v.r.s.s.txt == "b"