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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: F = None
        self.q: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: F = None
        self.q: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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