class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: B = None
        self.v: F = None
        self.q: C = None
        self.t: I = None
        self.y: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.y: J = None
        self.w: J = None
        self.z: G = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: F = None
        self.v: F = None
        self.y: G = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.y: J = None
        self.w: J = None
        self.z: G = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: F = None
        self.v: F = None
        self.y: G = None
        self.u: D = None
        self.txt = txt

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

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