class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: G = None
        self.t: G = None
        self.w: A = None
        self.u: G = None
        self.r: F = None
        self.p: G = None
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: F = None
        self.o: D = None
        self.x: D = None
        self.v: F = None
        self.u: E = None
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: F = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: B = None
        self.x: H = None
        self.y: H = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: G = None
        self.s: F = None
        self.r: D = None
        self.t: A = None
        self.y: B = None
        self.txt = txt

n = A("n")
f = B("f")
i = C("i")
l = D("l")
m = E("m")
h = F("h")
b = G("b")
g = H("g")
a = I("a")

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: G = None
        self.t: G = None
        self.w: A = None
        self.u: G = None
        self.r: F = None
        self.p: G = None
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: F = None
        self.o: D = None
        self.x: D = None
        self.v: F = None
        self.u: E = None
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: F = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: B = None
        self.x: H = None
        self.y: H = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: G = None
        self.s: F = None
        self.r: D = None
        self.t: A = None
        self.y: B = None
        self.txt = txt

n = A("n")
f = B("f")
i = C("i")
l = D("l")
m = E("m")
h = F("h")
b = G("b")
g = H("g")
a = I("a")

n.o = f
n.x = b
f.v = h
f.r = h
f.z = b
f.t = b
f.u = b
f.p = b
f.w = n
f.s = a
i.p = m
i.u = m
i.s = h
i.v = h
i.o = l
i.x = l
i.w = b
l.y = h
l.t = h
l.u = i
l.z = i
l.v = n
l.s = m
l.p = b
m.t = f
m.p = h
m.x = h
h.x = m
h.o = a
h.y = a
h.s = a
h.t = l
h.w = l
h.z = g
h.q = g
h.r = b
b.u = h
b.t = h
b.z = f
b.x = g
b.y = g
g.s = i
a.w = h
a.s = h
a.u = b
a.r = l
a.t = n
a.y = f
assert h.r.z.s.txt == "a"