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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: C = None
        self.q: E = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: E = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: I = None
        self.v: B = None
        self.r: I = None
        self.z: E = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: D = None
        self.v: H = None
        self.z: B = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: A = None
        self.v: D = None
        self.s: C = None
        self.y: E = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: F = None
        self.z: E = None
        self.q: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: E = None
        self.t: A = None
        self.q: A = None
        self.s: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: C = None
        self.q: E = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: E = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: I = None
        self.v: B = None
        self.r: I = None
        self.z: E = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: D = None
        self.v: H = None
        self.z: B = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: A = None
        self.v: D = None
        self.s: C = None
        self.y: E = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: F = None
        self.z: E = None
        self.q: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: E = None
        self.t: A = None
        self.q: A = None
        self.s: D = None
        self.txt = txt

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

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