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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: I = None
        self.w: F = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: E = None
        self.r: B = None
        self.z: E = None
        self.v: E = None
        self.x: E = None
        self.t: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: A = None
        self.w: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: I = None
        self.w: F = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: E = None
        self.r: B = None
        self.z: E = None
        self.v: E = None
        self.x: E = None
        self.t: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: A = None
        self.w: G = None
        self.txt = txt

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

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