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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: I = None
        self.t: A = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: G = None
        self.t: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: E = None
        self.x: I = None
        self.p: B = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: C = None
        self.t: D = None
        self.r: B = None
        self.w: D = None
        self.u: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: I = None
        self.t: A = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: G = None
        self.t: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: E = None
        self.x: I = None
        self.p: B = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: C = None
        self.t: D = None
        self.r: B = None
        self.w: D = None
        self.u: A = None
        self.txt = txt

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

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