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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: F = None
        self.y: F = None
        self.w: D = None
        self.x: E = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: H = None
        self.r: F = None
        self.t: I = None
        self.x: H = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: I = None
        self.o: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: C = None
        self.q: C = None
        self.v: D = None
        self.p: F = None
        self.t: E = None
        self.x: F = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: G = None
        self.t: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: F = None
        self.y: F = None
        self.w: D = None
        self.x: E = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: H = None
        self.r: F = None
        self.t: I = None
        self.x: H = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: I = None
        self.o: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: C = None
        self.q: C = None
        self.v: D = None
        self.p: F = None
        self.t: E = None
        self.x: F = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: G = None
        self.t: G = None
        self.txt = txt

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

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