class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: A = None
        self.w: A = None
        self.r: A = None
        self.s: C = None
        self.o: C = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: B = None
        self.s: H = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: H = None
        self.x: A = None
        self.v: A = None
        self.s: E = None
        self.q: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: B = None
        self.v: H = None
        self.z: F = None
        self.q: A = None
        self.s: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: A = None
        self.w: A = None
        self.r: A = None
        self.s: C = None
        self.o: C = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: B = None
        self.s: H = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: H = None
        self.x: A = None
        self.v: A = None
        self.s: E = None
        self.q: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: B = None
        self.v: H = None
        self.z: F = None
        self.q: A = None
        self.s: B = None
        self.txt = txt

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

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