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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: E = None
        self.r: H = None
        self.p: I = None
        self.q: C = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: C = None
        self.y: F = None
        self.p: H = None
        self.o: F = None
        self.u: F = None
        self.t: G = None
        self.v: D = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: E = None
        self.r: H = None
        self.p: I = None
        self.q: C = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: C = None
        self.y: F = None
        self.p: H = None
        self.o: F = None
        self.u: F = None
        self.t: G = None
        self.v: D = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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