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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: A = None
        self.txt = txt

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

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