class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: A = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: E = None
        self.v: C = None
        self.x: H = None
        self.z: A = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: B = None
        self.w: F = None
        self.o: H = None
        self.z: H = None
        self.s: E = None
        self.u: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: A = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: E = None
        self.v: C = None
        self.x: H = None
        self.z: A = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: B = None
        self.w: F = None
        self.o: H = None
        self.z: H = None
        self.s: E = None
        self.u: F = None
        self.txt = txt

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

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

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