class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: H = None
        self.z: F = None
        self.y: I = None
        self.w: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: C = None
        self.r: D = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: H = None
        self.z: F = None
        self.y: I = None
        self.w: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: C = None
        self.r: D = None
        self.u: A = None
        self.txt = txt

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

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