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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: D = None
        self.w: C = None
        self.z: F = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: I = None
        self.y: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: B = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: E = None
        self.t: C = None
        self.z: I = None
        self.r: G = None
        self.s: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: D = None
        self.x: D = None
        self.u: F = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: F = None
        self.z: F = None
        self.s: E = None
        self.p: B = None
        self.w: C = None
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: D = None
        self.w: C = None
        self.z: F = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: I = None
        self.y: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: B = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: E = None
        self.t: C = None
        self.z: I = None
        self.r: G = None
        self.s: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: D = None
        self.x: D = None
        self.u: F = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: F = None
        self.z: F = None
        self.s: E = None
        self.p: B = None
        self.w: C = None
        self.x: F = None
        self.txt = txt

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

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