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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: A = None
        self.w: A = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: G = None
        self.x: C = None
        self.u: I = None
        self.s: G = None
        self.y: I = None
        self.z: G = None
        self.w: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: F = None
        self.q: J = None
        self.u: I = None
        self.t: A = None
        self.o: J = None
        self.y: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: E = None
        self.s: F = None
        self.w: F = None
        self.z: I = None
        self.x: H = None
        self.t: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: A = None
        self.w: A = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: G = None
        self.x: C = None
        self.u: I = None
        self.s: G = None
        self.y: I = None
        self.z: G = None
        self.w: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: F = None
        self.q: J = None
        self.u: I = None
        self.t: A = None
        self.o: J = None
        self.y: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: E = None
        self.s: F = None
        self.w: F = None
        self.z: I = None
        self.x: H = None
        self.t: C = None
        self.txt = txt

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

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