class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: B = None
        self.p: D = None
        self.z: D = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: G = None
        self.t: C = None
        self.q: F = None
        self.x: H = None
        self.s: D = None
        self.z: F = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: F = None
        self.w: C = None
        self.x: G = None
        self.p: H = None
        self.q: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: F = None
        self.z: A = None
        self.t: C = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: G = None
        self.t: C = None
        self.q: F = None
        self.x: H = None
        self.s: D = None
        self.z: F = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: F = None
        self.w: C = None
        self.x: G = None
        self.p: H = None
        self.q: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: F = None
        self.z: A = None
        self.t: C = None
        self.w: E = None
        self.txt = txt

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

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

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

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