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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: J = None
        self.r: C = None
        self.v: G = None
        self.t: I = None
        self.z: C = None
        self.w: E = None
        self.o: D = None
        self.q: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: D = None
        self.v: D = None
        self.p: I = None
        self.s: B = None
        self.t: J = None
        self.r: E = None
        self.q: E = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: C = None
        self.r: B = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: J = None
        self.r: C = None
        self.v: G = None
        self.t: I = None
        self.z: C = None
        self.w: E = None
        self.o: D = None
        self.q: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: D = None
        self.v: D = None
        self.p: I = None
        self.s: B = None
        self.t: J = None
        self.r: E = None
        self.q: E = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: C = None
        self.r: B = None
        self.q: A = None
        self.txt = txt

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

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