class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: F = None
        self.p: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: D = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: D = None
        self.y: G = None
        self.t: B = None
        self.u: B = None
        self.v: E = None
        self.o: G = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: F = None
        self.p: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: D = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: D = None
        self.y: G = None
        self.t: B = None
        self.u: B = None
        self.v: E = None
        self.o: G = None
        self.z: B = None
        self.txt = txt

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

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