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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: A = None
        self.s: B = None
        self.u: G = None
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: E = None
        self.v: J = None
        self.z: A = None
        self.o: C = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: A = None
        self.z: B = None
        self.s: F = None
        self.w: F = None
        self.v: A = None
        self.o: D = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: A = None
        self.s: B = None
        self.u: G = None
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: E = None
        self.v: J = None
        self.z: A = None
        self.o: C = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: A = None
        self.z: B = None
        self.s: F = None
        self.w: F = None
        self.v: A = None
        self.o: D = None
        self.x: A = None
        self.txt = txt

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

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

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

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