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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: B = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: H = None
        self.t: C = None
        self.u: B = None
        self.v: H = None
        self.y: H = None
        self.q: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: B = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: H = None
        self.t: C = None
        self.u: B = None
        self.v: H = None
        self.y: H = None
        self.q: A = None
        self.txt = txt

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

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

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