class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: E = None
        self.r: G = None
        self.u: D = None
        self.z: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: I = None
        self.o: F = None
        self.x: I = None
        self.r: H = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: F = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

k = A("k")
l = B("l")
n = C("n")
m = D("m")
j = E("j")
g = F("g")
d = G("d")
a = H("a")
i = I("i")

k.v = g
k.q = j
k.r = d
k.z = d
k.u = m
l.p = a
l.r = a
l.u = i
l.x = i
l.t = i
l.o = g
n.z = d
n.t = g
n.r = g
m.r = d
j.z = k
j.o = k
j.t = a
j.s = a
j.v = l
j.r = l
j.y = d
j.p = g
j.w = m
g.v = m
g.q = m
g.w = k
g.x = l
g.t = n
g.y = d
g.s = d
g.z = j
d.z = a
d.r = j
d.y = n
d.w = n
d.x = l
d.o = m
d.p = m
d.s = g
a.v = k
a.w = g
i.s = m
assert m.r.r.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: E = None
        self.r: G = None
        self.u: D = None
        self.z: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: I = None
        self.o: F = None
        self.x: I = None
        self.r: H = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: F = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

k = A("k")
l = B("l")
n = C("n")
m = D("m")
j = E("j")
g = F("g")
d = G("d")
a = H("a")
i = I("i")

k.v = g
k.q = j
k.r = d
k.z = d
k.u = m
l.p = a
l.r = a
l.u = i
l.x = i
l.t = i
l.o = g
n.z = d
n.t = g
n.r = g
m.r = d
j.z = k
j.o = k
j.t = a
j.s = a
j.v = l
j.r = l
j.y = d
j.p = g
j.w = m
g.v = m
g.q = m
g.w = k
g.x = l
g.t = n
g.y = d
g.s = d
g.z = j
d.z = a
d.r = j
d.y = n
d.w = n
d.x = l
d.o = m
d.p = m
d.s = g
a.v = k
a.w = g
i.s = m
assert m.r.r.v.t.txt == "i"