class A:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: J = None
        self.z: A = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: C = None
        self.x: H = None
        self.r: E = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: D = None
        self.z: B = None
        self.v: E = None
        self.w: E = None
        self.y: J = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: J = None
        self.z: A = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: C = None
        self.x: H = None
        self.r: E = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: D = None
        self.z: B = None
        self.v: E = None
        self.w: E = None
        self.y: J = None
        self.txt = txt

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

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

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

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