class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: H = None
        self.v: F = None
        self.q: B = None
        self.r: G = None
        self.x: G = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: H = None
        self.q: F = None
        self.y: J = None
        self.z: J = None
        self.s: J = None
        self.o: D = None
        self.x: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: I = None
        self.w: H = None
        self.x: I = None
        self.s: I = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: I = None
        self.x: A = None
        self.w: E = None
        self.y: J = None
        self.q: B = None
        self.s: H = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: F = None
        self.t: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: H = None
        self.t: H = None
        self.p: D = None
        self.z: E = None
        self.q: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: H = None
        self.q: F = None
        self.y: J = None
        self.z: J = None
        self.s: J = None
        self.o: D = None
        self.x: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: I = None
        self.w: H = None
        self.x: I = None
        self.s: I = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: I = None
        self.x: A = None
        self.w: E = None
        self.y: J = None
        self.q: B = None
        self.s: H = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: F = None
        self.t: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: H = None
        self.t: H = None
        self.p: D = None
        self.z: E = None
        self.q: H = None
        self.txt = txt

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

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

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