class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: G = None
        self.o: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.x: F = None
        self.o: F = None
        self.t: C = None
        self.s: D = None
        self.p: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: C = None
        self.v: E = None
        self.s: B = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.x: F = None
        self.o: F = None
        self.t: C = None
        self.s: D = None
        self.p: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: C = None
        self.v: E = None
        self.s: B = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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