class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: H = None
        self.s: D = None
        self.u: G = None
        self.z: G = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: H = None
        self.p: F = None
        self.t: A = None
        self.u: F = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: A = None
        self.z: I = None
        self.q: B = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: D = None
        self.u: G = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: F = None
        self.o: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: B = None
        self.y: E = None
        self.z: A = None
        self.s: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: H = None
        self.p: F = None
        self.t: A = None
        self.u: F = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: A = None
        self.z: I = None
        self.q: B = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: D = None
        self.u: G = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: F = None
        self.o: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: B = None
        self.y: E = None
        self.z: A = None
        self.s: E = None
        self.txt = txt

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

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