class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: I = None
        self.q: B = None
        self.t: E = None
        self.s: I = None
        self.y: F = None
        self.u: A = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: F = None
        self.y: B = None
        self.o: B = None
        self.u: D = None
        self.s: C = None
        self.z: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: F = None
        self.q: F = None
        self.u: B = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: F = None
        self.y: B = None
        self.o: B = None
        self.u: D = None
        self.s: C = None
        self.z: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: F = None
        self.q: F = None
        self.u: B = None
        self.z: C = None
        self.txt = txt

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

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

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