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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: F = None
        self.z: I = None
        self.w: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: H = None
        self.z: B = None
        self.s: C = None
        self.y: A = None
        self.q: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: D = None
        self.r: A = None
        self.s: I = None
        self.x: F = None
        self.w: I = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: H = None
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: F = None
        self.z: I = None
        self.w: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: H = None
        self.z: B = None
        self.s: C = None
        self.y: A = None
        self.q: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: D = None
        self.r: A = None
        self.s: I = None
        self.x: F = None
        self.w: I = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: H = None
        self.w: A = None
        self.txt = txt

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

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