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

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

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

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

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

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

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

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

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

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

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

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

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