class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: B = None
        self.v: F = None
        self.z: E = None
        self.w: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: G = None
        self.u: I = None
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: A = None
        self.x: B = None
        self.w: G = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: B = None
        self.o: E = None
        self.v: A = None
        self.p: B = None
        self.r: I = None
        self.w: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: D = None
        self.u: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: G = None
        self.u: I = None
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: A = None
        self.x: B = None
        self.w: G = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: B = None
        self.o: E = None
        self.v: A = None
        self.p: B = None
        self.r: I = None
        self.w: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: D = None
        self.u: H = None
        self.txt = txt

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

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