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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: A = None
        self.s: I = None
        self.z: H = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: C = None
        self.z: B = None
        self.p: F = None
        self.r: I = None
        self.y: I = None
        self.s: H = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: E = None
        self.o: H = None
        self.p: I = None
        self.q: B = None
        self.x: E = None
        self.t: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: A = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: A = None
        self.s: I = None
        self.z: H = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: C = None
        self.z: B = None
        self.p: F = None
        self.r: I = None
        self.y: I = None
        self.s: H = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: E = None
        self.o: H = None
        self.p: I = None
        self.q: B = None
        self.x: E = None
        self.t: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: A = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: H = None
        self.txt = txt

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

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