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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: C = None
        self.u: A = None
        self.t: H = None
        self.o: D = None
        self.q: C = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: C = None
        self.u: A = None
        self.t: H = None
        self.o: D = None
        self.q: C = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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