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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: J = None
        self.r: H = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: J = None
        self.o: J = None
        self.r: A = None
        self.y: C = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: I = None
        self.p: H = None
        self.r: H = None
        self.y: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: J = None
        self.r: H = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: J = None
        self.o: J = None
        self.r: A = None
        self.y: C = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: I = None
        self.p: H = None
        self.r: H = None
        self.y: G = None
        self.txt = txt

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

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