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

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

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

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

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

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

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

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

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

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

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

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

h.s = b
h.w = f
h.z = g
j.s = h
j.u = f
j.t = f
j.z = b
j.o = a
f.o = h
f.y = l
f.p = l
b.o = h
b.z = l
l.x = b
l.v = b
l.o = h
l.w = h
g.s = h
g.u = f
g.t = f
g.z = b
g.o = j
c.s = h
c.u = f
c.t = f
c.z = b
c.o = j
a.s = h
a.u = f
a.t = f
a.z = b
a.o = j
assert b.z.o.w.y.txt == "l"