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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: H = None
        self.x: H = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: H = None
        self.x: H = None
        self.u: C = None
        self.txt = txt

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

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

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