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

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

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

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

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

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

b.v = h
b.r = m
b.q = m
m.z = e
a.s = e
a.x = e
a.z = e
a.y = f
g.v = m
g.t = e
g.y = e
g.s = f
e.s = b
e.q = i
e.y = m
h.v = b
h.r = m
h.q = m
i.s = e
i.x = e
i.z = e
i.y = d
d.v = m
d.t = e
d.y = e
d.s = f
f.v = m
f.t = e
f.y = e
f.s = g
c.s = e
c.x = e
c.z = e
c.y = d
assert e.q.y.v.z.s.v.v.v.q.txt == "
class A:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: B = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

b.v = h
b.r = m
b.q = m
m.z = e
a.s = e
a.x = e
a.z = e
a.y = f
g.v = m
g.t = e
g.y = e
g.s = f
e.s = b
e.q = i
e.y = m
h.v = b
h.r = m
h.q = m
i.s = e
i.x = e
i.z = e
i.y = d
d.v = m
d.t = e
d.y = e
d.s = f
f.v = m
f.t = e
f.y = e
f.s = g
c.s = e
c.x = e
c.z = e
c.y = d
assert e.q.y.v.z.s.v.v.v.q.txt == "m"