class A:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: E = None
        self.z: I = None
        self.v: B = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: G = None
        self.y: E = None
        self.p: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: A = None
        self.v: B = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: E = None
        self.z: I = None
        self.v: B = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: G = None
        self.y: E = None
        self.p: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: A = None
        self.v: B = None
        self.q: B = None
        self.txt = txt

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

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