class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: H = None
        self.y: B = None
        self.x: F = None
        self.t: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: B = None
        self.o: H = None
        self.t: A = None
        self.u: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: H = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: B = None
        self.txt = txt

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

i = A("i")
k = B("k")
h = C("h")
g = D("g")
f = E("f")
b = F("b")
j = G("j")
m = H("m")
d = E("d")
e = E("e")

i.s = d
i.w = m
i.y = k
i.x = b
i.t = g
k.w = g
k.y = f
k.x = m
h.u = g
h.z = j
g.w = j
g.s = k
g.o = m
g.t = i
g.u = e
f.z = m
f.w = i
f.x = k
b.v = k
b.w = m
b.x = d
j.p = b
j.v = k
m.y = f
d.z = m
d.w = i
d.x = k
e.z = m
e.w = i
e.x = k
assert f.z.y.x.x.y.w.y.w.u.z.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: H = None
        self.y: B = None
        self.x: F = None
        self.t: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: B = None
        self.o: H = None
        self.t: A = None
        self.u: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: H = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: B = None
        self.txt = txt

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

i = A("i")
k = B("k")
h = C("h")
g = D("g")
f = E("f")
b = F("b")
j = G("j")
m = H("m")
d = E("d")
e = E("e")

i.s = d
i.w = m
i.y = k
i.x = b
i.t = g
k.w = g
k.y = f
k.x = m
h.u = g
h.z = j
g.w = j
g.s = k
g.o = m
g.t = i
g.u = e
f.z = m
f.w = i
f.x = k
b.v = k
b.w = m
b.x = d
j.p = b
j.v = k
m.y = f
d.z = m
d.w = i
d.x = k
e.z = m
e.w = i
e.x = k
assert f.z.y.x.x.y.w.y.w.u.z.txt == "m"