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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: G = None
        self.p: B = None
        self.v: E = None
        self.o: A = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: A = None
        self.r: B = None
        self.p: H = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: A = None
        self.s: G = None
        self.o: H = None
        self.w: H = None
        self.y: D = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: G = None
        self.p: B = None
        self.v: E = None
        self.o: A = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: A = None
        self.r: B = None
        self.p: H = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: A = None
        self.s: G = None
        self.o: H = None
        self.w: H = None
        self.y: D = None
        self.z: E = None
        self.txt = txt

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

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

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

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