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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: F = None
        self.o: A = None
        self.x: A = None
        self.s: H = None
        self.q: D = None
        self.v: D = None
        self.t: D = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: A = None
        self.p: H = None
        self.u: C = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: H = None
        self.r: I = None
        self.x: A = None
        self.o: H = None
        self.p: A = None
        self.z: C = None
        self.y: I = None
        self.s: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: F = None
        self.o: A = None
        self.x: A = None
        self.s: H = None
        self.q: D = None
        self.v: D = None
        self.t: D = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: A = None
        self.p: H = None
        self.u: C = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: H = None
        self.r: I = None
        self.x: A = None
        self.o: H = None
        self.p: A = None
        self.z: C = None
        self.y: I = None
        self.s: B = None
        self.txt = txt

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

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

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

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