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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: H = None
        self.w: C = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: H = None
        self.w: C = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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