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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: D = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: B = None
        self.o: I = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: D = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: B = None
        self.o: I = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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