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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: C = None
        self.p: G = None
        self.s: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: C = None
        self.z: B = None
        self.o: H = None
        self.x: B = None
        self.u: C = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: B = None
        self.z: I = None
        self.x: D = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: F = None
        self.y: C = None
        self.w: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: C = None
        self.p: G = None
        self.s: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: C = None
        self.z: B = None
        self.o: H = None
        self.x: B = None
        self.u: C = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: B = None
        self.z: I = None
        self.x: D = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: F = None
        self.y: C = None
        self.w: B = None
        self.txt = txt

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

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

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