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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: B = None
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.q: F = None
        self.o: H = None
        self.t: H = None
        self.p: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: C = None
        self.s: H = None
        self.q: D = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: H = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: D = None
        self.y: E = None
        self.w: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: B = None
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.q: F = None
        self.o: H = None
        self.t: H = None
        self.p: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: C = None
        self.s: H = None
        self.q: D = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: H = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: D = None
        self.y: E = None
        self.w: D = None
        self.txt = txt

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

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