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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: I = None
        self.w: F = None
        self.s: E = None
        self.z: F = None
        self.r: D = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: I = None
        self.q: B = None
        self.z: B = None
        self.y: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: I = None
        self.u: F = None
        self.s: E = None
        self.q: I = None
        self.v: H = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: F = None
        self.v: E = None
        self.u: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: I = None
        self.w: F = None
        self.s: E = None
        self.z: F = None
        self.r: D = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: I = None
        self.q: B = None
        self.z: B = None
        self.y: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: I = None
        self.u: F = None
        self.s: E = None
        self.q: I = None
        self.v: H = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: F = None
        self.v: E = None
        self.u: B = None
        self.txt = txt

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

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

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