class A:
    def __init__(self, txt: str):
        self.r: J = None
        self.u: D = None
        self.t: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: F = None
        self.t: G = None
        self.v: J = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: G = None
        self.t: A = None
        self.u: E = None
        self.r: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: F = None
        self.t: G = None
        self.v: J = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: G = None
        self.t: A = None
        self.u: E = None
        self.r: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: G = None
        self.txt = txt

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

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