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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: A = None
        self.s: E = None
        self.z: A = None
        self.y: G = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: F = None
        self.u: B = None
        self.o: G = None
        self.p: C = None
        self.v: F = None
        self.r: F = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: F = None
        self.y: B = None
        self.x: D = None
        self.v: G = None
        self.u: A = None
        self.txt = txt

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

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

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

n = A("n")
k = B("k")
h = C("h")
e = D("e")
m = E("m")
l = F("l")
d = G("d")
g = H("g")
i = B("i")

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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: A = None
        self.s: E = None
        self.z: A = None
        self.y: G = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: F = None
        self.u: B = None
        self.o: G = None
        self.p: C = None
        self.v: F = None
        self.r: F = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: F = None
        self.y: B = None
        self.x: D = None
        self.v: G = None
        self.u: A = None
        self.txt = txt

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

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

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

n = A("n")
k = B("k")
h = C("h")
e = D("e")
m = E("m")
l = F("l")
d = G("d")
g = H("g")
i = B("i")

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