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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: C = None
        self.z: G = None
        self.y: G = None
        self.v: B = None
        self.p: A = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: H = None
        self.y: D = None
        self.x: C = None
        self.z: F = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: H = None
        self.p: B = None
        self.x: B = None
        self.txt = txt

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

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

k.w = f
k.p = h
f.y = e
a.q = f
j.x = e
j.w = e
j.o = a
j.z = h
j.y = h
j.v = f
j.p = k
i.v = j
i.q = e
i.y = m
i.x = a
i.z = c
i.s = k
c.z = e
c.q = i
c.t = j
c.x = k
h.u = i
h.o = e
h.p = f
h.x = f
e.t = f
e.y = f
e.w = f
e.s = c
e.x = k
e.o = k
m.x = e
m.w = e
m.o = a
m.z = h
m.y = h
m.v = f
m.p = k
g.z = e
g.q = i
g.t = m
g.x = k
assert f.y.s.q.z.q.z.z.o.p.o.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: C = None
        self.z: G = None
        self.y: G = None
        self.v: B = None
        self.p: A = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: H = None
        self.y: D = None
        self.x: C = None
        self.z: F = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: H = None
        self.p: B = None
        self.x: B = None
        self.txt = txt

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

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

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