class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: J = None
        self.t: J = None
        self.q: F = None
        self.r: C = None
        self.y: G = None
        self.o: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: A = None
        self.x: F = None
        self.q: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: C = None
        self.s: D = None
        self.y: A = None
        self.r: D = None
        self.w: C = None
        self.v: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: H = None
        self.x: E = None
        self.p: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: A = None
        self.x: F = None
        self.q: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: C = None
        self.s: D = None
        self.y: A = None
        self.r: D = None
        self.w: C = None
        self.v: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: H = None
        self.x: E = None
        self.p: B = None
        self.txt = txt

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

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