class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: H = None
        self.x: A = None
        self.r: B = None
        self.w: H = None
        self.t: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: D = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: F = None
        self.o: D = None
        self.s: A = None
        self.p: F = None
        self.v: B = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: H = None
        self.x: A = None
        self.r: B = None
        self.w: H = None
        self.t: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: D = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: F = None
        self.o: D = None
        self.s: A = None
        self.p: F = None
        self.v: B = None
        self.u: C = None
        self.txt = txt

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

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

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