class A:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: E = None
        self.w: I = None
        self.o: G = None
        self.r: D = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: A = None
        self.x: F = None
        self.s: H = None
        self.o: E = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: B = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: C = None
        self.w: B = None
        self.y: B = None
        self.v: E = None
        self.p: H = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: G = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: A = None
        self.x: F = None
        self.s: H = None
        self.o: E = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: B = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: C = None
        self.w: B = None
        self.y: B = None
        self.v: E = None
        self.p: H = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: G = None
        self.u: G = None
        self.txt = txt

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

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

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

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

a.s = h
a.w = h
a.y = m
a.p = m
a.o = f
a.r = j
k.u = m
k.o = m
k.q = a
k.x = d
k.s = c
k.y = b
b.z = h
b.w = h
b.x = k
j.z = a
j.q = b
j.w = k
j.y = k
j.v = m
j.s = m
j.p = c
m.x = c
m.q = d
m.u = h
m.o = k
m.z = k
m.s = b
m.p = j
m.v = a
d.w = g
d.q = f
d.u = f
f.q = c
f.o = h
c.q = h
c.z = g
c.s = a
c.x = j
c.u = b
h.w = m
h.x = m
h.p = m
h.s = f
g.q = h
g.z = c
g.s = a
g.x = j
g.u = b
assert h.s.q.z.z.s.txt == "a"