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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: H = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: B = None
        self.v: G = None
        self.r: A = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: D = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: E = None
        self.s: D = None
        self.x: E = None
        self.r: E = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: H = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: B = None
        self.v: G = None
        self.r: A = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: D = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: E = None
        self.s: D = None
        self.x: E = None
        self.r: E = None
        self.z: H = None
        self.txt = txt

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

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

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