class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: D = None
        self.x: B = None
        self.s: E = None
        self.v: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: B = None
        self.w: A = None
        self.o: I = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: B = None
        self.w: A = None
        self.o: I = None
        self.txt = txt

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

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

k.o = f
k.r = b
k.v = b
k.x = n
k.s = d
n.w = h
n.x = d
n.q = d
n.z = e
n.v = g
n.p = f
m.v = e
m.z = g
m.s = k
m.w = b
b.u = f
b.p = m
d.o = k
d.t = m
d.u = m
d.z = g
d.y = b
g.u = d
f.p = d
f.u = b
f.q = m
f.y = m
f.t = n
f.o = n
f.z = e
f.w = g
h.y = d
h.r = n
h.w = k
h.o = e
e.u = m
e.v = m
e.y = m
e.s = h
e.p = g
e.r = g
e.w = n
e.q = b
assert n.w.w.r.p.s.txt == "k"