class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: D = None
        self.r: C = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: G = None
        self.o: F = None
        self.y: C = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: G = None
        self.o: F = None
        self.y: C = None
        self.s: B = None
        self.txt = txt

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

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