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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: A = None
        self.x: E = None
        self.v: E = None
        self.txt = txt

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

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

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

h.z = k
h.w = l
h.v = l
l.u = g
l.t = a
l.r = h
a.u = b
a.x = b
a.v = b
a.s = h
f.z = l
b.u = g
b.p = l
g.u = k
g.x = k
g.v = k
g.s = h
i.u = b
i.s = h
i.x = k
i.v = k
k.u = e
k.p = l
e.u = k
e.x = k
e.v = k
e.s = h
j.u = b
j.x = b
j.v = b
j.s = h
assert l.r.v.r.v.u.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: B = None
        self.v: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: A = None
        self.x: E = None
        self.v: E = None
        self.txt = txt

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

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

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

h.z = k
h.w = l
h.v = l
l.u = g
l.t = a
l.r = h
a.u = b
a.x = b
a.v = b
a.s = h
f.z = l
b.u = g
b.p = l
g.u = k
g.x = k
g.v = k
g.s = h
i.u = b
i.s = h
i.x = k
i.v = k
k.u = e
k.p = l
e.u = k
e.x = k
e.v = k
e.s = h
j.u = b
j.x = b
j.v = b
j.s = h
assert l.r.v.r.v.u.s.z.txt == "k"