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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: C = None
        self.t: I = None
        self.o: C = None
        self.v: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.z: D = None
        self.o: H = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: B = None
        self.w: C = None
        self.z: I = None
        self.x: H = None
        self.u: C = None
        self.t: H = None
        self.r: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: J = None
        self.v: B = None
        self.u: J = None
        self.t: I = None
        self.r: D = None
        self.s: G = None
        self.y: E = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: C = None
        self.s: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: H = None
        self.v: G = None
        self.p: G = None
        self.z: D = None
        self.t: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: C = None
        self.t: I = None
        self.o: C = None
        self.v: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.z: D = None
        self.o: H = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: B = None
        self.w: C = None
        self.z: I = None
        self.x: H = None
        self.u: C = None
        self.t: H = None
        self.r: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: J = None
        self.v: B = None
        self.u: J = None
        self.t: I = None
        self.r: D = None
        self.s: G = None
        self.y: E = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: C = None
        self.s: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: H = None
        self.v: G = None
        self.p: G = None
        self.z: D = None
        self.t: I = None
        self.txt = txt

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

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