class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: B = None
        self.p: D = None
        self.r: F = None
        self.w: B = None
        self.t: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: A = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: C = None
        self.x: G = None
        self.y: C = None
        self.t: H = None
        self.s: F = None
        self.z: F = None
        self.v: G = None
        self.r: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: A = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: C = None
        self.x: G = None
        self.y: C = None
        self.t: H = None
        self.s: F = None
        self.z: F = None
        self.v: G = None
        self.r: F = None
        self.txt = txt

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

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