class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: C = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: E = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.q: F = None
        self.u: I = None
        self.x: I = None
        self.s: B = None
        self.y: E = None
        self.z: J = None
        self.p: D = None
        self.r: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: J = None
        self.u: F = None
        self.z: F = None
        self.s: F = None
        self.r: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: E = None
        self.t: J = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: C = None
        self.v: J = None
        self.s: E = None
        self.q: G = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: B = None
        self.v: H = None
        self.x: H = None
        self.r: A = None
        self.o: B = None
        self.y: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: E = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.q: F = None
        self.u: I = None
        self.x: I = None
        self.s: B = None
        self.y: E = None
        self.z: J = None
        self.p: D = None
        self.r: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: J = None
        self.u: F = None
        self.z: F = None
        self.s: F = None
        self.r: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: E = None
        self.t: J = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: C = None
        self.v: J = None
        self.s: E = None
        self.q: G = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: B = None
        self.v: H = None
        self.x: H = None
        self.r: A = None
        self.o: B = None
        self.y: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: E = None
        self.txt = txt

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

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