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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: E = None
        self.t: E = None
        self.w: E = None
        self.v: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: I = None
        self.s: C = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: D = None
        self.v: F = None
        self.s: D = None
        self.x: I = None
        self.t: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: E = None
        self.t: E = None
        self.w: E = None
        self.v: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: I = None
        self.s: C = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: D = None
        self.v: F = None
        self.s: D = None
        self.x: I = None
        self.t: G = None
        self.txt = txt

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

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

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