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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: D = None
        self.u: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: D = None
        self.u: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

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