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

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

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

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

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

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

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

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

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

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

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

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

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