class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: E = None
        self.v: C = None
        self.u: D = None
        self.x: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: D = None
        self.x: B = None
        self.s: C = None
        self.y: C = None
        self.q: E = None
        self.r: G = None
        self.v: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: E = None
        self.o: A = None
        self.q: H = None
        self.v: H = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: D = None
        self.x: B = None
        self.s: C = None
        self.y: C = None
        self.q: E = None
        self.r: G = None
        self.v: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: E = None
        self.o: A = None
        self.q: H = None
        self.v: H = None
        self.r: E = None
        self.txt = txt

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

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