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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: D = None
        self.q: A = None
        self.r: B = None
        self.w: A = None
        self.txt = txt

g = A("g")
l = B("l")
a = C("a")
c = D("c")
i = E("i")
j = A("j")
k = E("k")
m = B("m")

g.s = j
g.u = l
l.r = m
l.w = m
l.z = a
a.r = i
a.t = c
c.s = k
c.v = i
c.z = l
c.p = m
i.o = k
i.y = c
i.q = g
i.w = g
i.r = m
j.s = g
j.u = l
k.o = i
k.y = c
k.q = g
k.w = g
k.r = l
m.r = l
m.w = l
m.z = a
assert g.s.s.u.w.w.w.r.txt == "
class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: D = None
        self.q: A = None
        self.r: B = None
        self.w: A = None
        self.txt = txt

g = A("g")
l = B("l")
a = C("a")
c = D("c")
i = E("i")
j = A("j")
k = E("k")
m = B("m")

g.s = j
g.u = l
l.r = m
l.w = m
l.z = a
a.r = i
a.t = c
c.s = k
c.v = i
c.z = l
c.p = m
i.o = k
i.y = c
i.q = g
i.w = g
i.r = m
j.s = g
j.u = l
k.o = i
k.y = c
k.q = g
k.w = g
k.r = l
m.r = l
m.w = l
m.z = a
assert g.s.s.u.w.w.w.r.txt == "l"