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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: G = None
        self.o: E = None
        self.x: A = None
        self.p: H = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: B = None
        self.w: G = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: F = None
        self.p: E = None
        self.t: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: G = None
        self.s: D = None
        self.r: F = None
        self.o: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: G = None
        self.o: E = None
        self.x: A = None
        self.p: H = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: B = None
        self.w: G = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: F = None
        self.p: E = None
        self.t: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: G = None
        self.s: D = None
        self.r: F = None
        self.o: H = None
        self.txt = txt

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

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