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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: E = None
        self.p: A = None
        self.y: B = None
        self.txt = txt

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

l = A("l")
g = B("g")
a = C("a")
n = D("n")
j = E("j")
i = C("i")
c = C("c")
h = E("h")
f = C("f")
e = C("e")

l.y = a
l.s = g
l.v = n
g.w = j
g.p = i
g.z = l
a.y = l
a.q = n
a.s = n
a.p = g
n.t = g
n.y = g
n.o = j
n.p = l
j.y = l
j.x = l
j.t = c
i.y = l
i.q = n
i.s = n
i.p = g
c.y = l
c.q = n
c.s = n
c.p = g
h.y = l
h.x = l
h.t = e
f.y = l
f.q = n
f.s = n
f.p = g
e.y = l
e.q = n
e.s = n
e.p = g
assert i.s.p.s.w.y.s.w.t.p.z.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: B = None
        self.v: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: E = None
        self.p: A = None
        self.y: B = None
        self.txt = txt

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

l = A("l")
g = B("g")
a = C("a")
n = D("n")
j = E("j")
i = C("i")
c = C("c")
h = E("h")
f = C("f")
e = C("e")

l.y = a
l.s = g
l.v = n
g.w = j
g.p = i
g.z = l
a.y = l
a.q = n
a.s = n
a.p = g
n.t = g
n.y = g
n.o = j
n.p = l
j.y = l
j.x = l
j.t = c
i.y = l
i.q = n
i.s = n
i.p = g
c.y = l
c.q = n
c.s = n
c.p = g
h.y = l
h.x = l
h.t = e
f.y = l
f.q = n
f.s = n
f.p = g
e.y = l
e.q = n
e.s = n
e.p = g
assert i.s.p.s.w.y.s.w.t.p.z.txt == "l"