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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: H = None
        self.q: E = None
        self.r: D = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: D = None
        self.y: B = None
        self.x: A = None
        self.r: H = None
        self.q: F = None
        self.w: B = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: H = None
        self.q: E = None
        self.r: D = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: D = None
        self.y: B = None
        self.x: A = None
        self.r: H = None
        self.q: F = None
        self.w: B = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

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