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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: J = None
        self.t: J = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: I = None
        self.y: F = None
        self.w: I = None
        self.q: F = None
        self.t: H = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: E = None
        self.t: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: E = None
        self.p: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: H = None
        self.o: A = None
        self.x: H = None
        self.z: F = None
        self.t: H = None
        self.s: C = None
        self.r: H = None
        self.q: I = None
        self.y: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: J = None
        self.t: J = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: I = None
        self.y: F = None
        self.w: I = None
        self.q: F = None
        self.t: H = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: E = None
        self.t: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: E = None
        self.p: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: H = None
        self.o: A = None
        self.x: H = None
        self.z: F = None
        self.t: H = None
        self.s: C = None
        self.r: H = None
        self.q: I = None
        self.y: H = None
        self.txt = txt

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

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