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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: A = None
        self.r: F = None
        self.v: F = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: A = None
        self.r: F = None
        self.v: F = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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