class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: B = None
        self.w: E = None
        self.r: C = None
        self.x: G = None
        self.t: F = None
        self.o: E = None
        self.q: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: B = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: B = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

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