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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: H = None
        self.u: H = None
        self.p: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: G = None
        self.t: C = None
        self.r: B = None
        self.y: A = None
        self.v: E = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: C = None
        self.t: H = None
        self.w: H = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: D = None
        self.txt = txt

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

k.t = m
k.w = h
m.y = h
m.s = b
m.z = a
a.t = m
a.q = h
a.u = h
a.p = k
i.s = m
i.p = g
i.z = k
i.t = k
g.o = a
g.q = m
n.p = h
n.s = b
n.t = a
n.r = m
n.q = m
n.y = k
n.v = g
b.r = d
b.v = a
b.z = a
b.t = h
b.w = h
h.o = g
h.u = d
d.s = m
d.p = g
d.z = k
d.t = k
assert h.u.p.o.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: H = None
        self.u: H = None
        self.p: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: G = None
        self.t: C = None
        self.r: B = None
        self.y: A = None
        self.v: E = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: C = None
        self.t: H = None
        self.w: H = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: D = None
        self.txt = txt

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

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