class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: A = None
        self.u: F = None
        self.x: D = None
        self.w: F = None
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: C = None
        self.y: E = None
        self.q: H = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: C = None
        self.r: B = None
        self.o: H = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: E = None
        self.p: D = None
        self.t: B = None
        self.r: E = None
        self.q: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: A = None
        self.u: F = None
        self.x: D = None
        self.w: F = None
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: C = None
        self.y: E = None
        self.q: H = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: C = None
        self.r: B = None
        self.o: H = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: E = None
        self.p: D = None
        self.t: B = None
        self.r: E = None
        self.q: D = None
        self.txt = txt

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

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

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