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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: A = None
        self.o: I = None
        self.p: J = None
        self.z: E = None
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: F = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: B = None
        self.t: B = None
        self.p: A = None
        self.w: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: B = None
        self.u: D = None
        self.y: D = None
        self.p: F = None
        self.z: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: B = None
        self.o: I = None
        self.t: G = None
        self.w: I = None
        self.u: I = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: A = None
        self.o: I = None
        self.p: J = None
        self.z: E = None
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: F = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: B = None
        self.t: B = None
        self.p: A = None
        self.w: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: B = None
        self.u: D = None
        self.y: D = None
        self.p: F = None
        self.z: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: B = None
        self.o: I = None
        self.t: G = None
        self.w: I = None
        self.u: I = None
        self.txt = txt

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

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