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

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

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

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

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

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

m.x = l
m.z = l
m.r = e
c.u = f
c.t = f
k.w = m
k.u = f
g.q = f
g.r = l
g.o = a
g.v = c
g.y = c
l.s = k
l.o = e
l.z = e
n.w = m
n.u = c
a.q = f
a.y = f
a.r = l
a.o = g
a.v = c
e.x = l
e.z = l
e.r = m
f.u = c
f.t = c
h.q = f
h.v = f
h.r = l
h.o = g
h.y = c
assert l.s.w.r.r.r.x.z.z.s.w.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: A = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

m.x = l
m.z = l
m.r = e
c.u = f
c.t = f
k.w = m
k.u = f
g.q = f
g.r = l
g.o = a
g.v = c
g.y = c
l.s = k
l.o = e
l.z = e
n.w = m
n.u = c
a.q = f
a.y = f
a.r = l
a.o = g
a.v = c
e.x = l
e.z = l
e.r = m
f.u = c
f.t = c
h.q = f
h.v = f
h.r = l
h.o = g
h.y = c
assert l.s.w.r.r.r.x.z.z.s.w.txt == "m"