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

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: H = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: F = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: C = None
        self.w: H = None
        self.txt = txt

e = A("e")
h = B("h")
k = C("k")
l = D("l")
d = E("d")
i = F("i")
c = G("c")
b = H("b")
m = I("m")
a = B("a")

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: H = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: F = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: C = None
        self.w: H = None
        self.txt = txt

e = A("e")
h = B("h")
k = C("k")
l = D("l")
d = E("d")
i = F("i")
c = G("c")
b = H("b")
m = I("m")
a = B("a")

e.v = d
e.w = h
e.r = h
h.z = m
k.u = i
k.w = l
l.s = c
d.x = m
d.y = b
i.p = c
i.r = c
i.t = b
c.u = k
c.x = k
c.q = i
b.p = h
b.s = h
m.p = b
m.w = b
m.r = k
a.z = m
assert h.z.w.s.z.r.w.txt == "l"