class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: G = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: J = None
        self.u: E = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: A = None
        self.s: E = None
        self.w: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: G = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: J = None
        self.u: E = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: A = None
        self.s: E = None
        self.w: G = None
        self.txt = txt

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

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

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

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

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

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

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

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