class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: G = None
        self.u: E = None
        self.x: G = None
        self.r: F = None
        self.t: D = None
        self.p: F = None
        self.z: H = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: E = None
        self.t: I = None
        self.o: B = None
        self.w: C = None
        self.s: E = None
        self.y: B = None
        self.x: A = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: C = None
        self.w: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: E = None
        self.t: I = None
        self.o: B = None
        self.w: C = None
        self.s: E = None
        self.y: B = None
        self.x: A = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: C = None
        self.w: H = None
        self.txt = txt

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

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