class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: J = None
        self.z: G = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: A = None
        self.y: G = None
        self.w: H = None
        self.r: I = None
        self.t: G = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: H = None
        self.x: H = None
        self.z: H = None
        self.s: B = None
        self.q: G = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: B = None
        self.o: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.q: D = None
        self.v: I = None
        self.u: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: H = None
        self.w: B = None
        self.o: B = None
        self.s: H = None
        self.v: B = None
        self.txt = txt

n = A("n")
h = B("h")
j = C("j")
i = D("i")
a = E("a")
g = F("g")
l = G("l")
c = H("c")
e = I("e")
b = J("b")

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: A = None
        self.y: G = None
        self.w: H = None
        self.r: I = None
        self.t: G = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: H = None
        self.x: H = None
        self.z: H = None
        self.s: B = None
        self.q: G = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: B = None
        self.o: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.q: D = None
        self.v: I = None
        self.u: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: H = None
        self.w: B = None
        self.o: B = None
        self.s: H = None
        self.v: B = None
        self.txt = txt

n = A("n")
h = B("h")
j = C("j")
i = D("i")
a = E("a")
g = F("g")
l = G("l")
c = H("c")
e = I("e")
b = J("b")

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