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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: F = None
        self.v: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: F = None
        self.t: A = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: F = None
        self.v: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: F = None
        self.t: A = None
        self.w: F = None
        self.txt = txt

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

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