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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: J = None
        self.r: J = None
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: D = None
        self.w: I = None
        self.v: J = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: B = None
        self.t: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: G = None
        self.q: F = None
        self.p: G = None
        self.u: H = None
        self.s: B = None
        self.r: F = None
        self.y: H = None
        self.o: A = None
        self.txt = txt

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

g = A("g")
m = B("m")
b = C("b")
i = D("i")
e = E("e")
n = F("n")
a = G("a")
d = H("d")
k = I("k")
l = J("l")

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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: J = None
        self.r: J = None
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: D = None
        self.w: I = None
        self.v: J = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: B = None
        self.t: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: G = None
        self.q: F = None
        self.p: G = None
        self.u: H = None
        self.s: B = None
        self.r: F = None
        self.y: H = None
        self.o: A = None
        self.txt = txt

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

g = A("g")
m = B("m")
b = C("b")
i = D("i")
e = E("e")
n = F("n")
a = G("a")
d = H("d")
k = I("k")
l = J("l")

g.v = b
g.r = b
g.z = e
m.z = l
m.w = n
b.w = m
b.o = l
b.r = l
b.s = k
i.p = e
i.y = d
e.z = m
e.x = i
e.w = k
e.v = l
e.p = b
n.t = b
a.y = e
a.s = m
a.t = d
d.x = n
d.t = n
d.s = n
d.u = b
d.r = a
k.w = n
k.q = n
k.r = n
k.z = a
k.p = a
k.u = d
k.y = d
k.s = m
k.o = g
l.s = i
l.t = n
l.p = g
assert k.s.z.t.t.w.w.txt == "n"