class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: B = None
        self.s: B = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: F = None
        self.v: F = None
        self.w: C = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: B = None
        self.o: B = None
        self.s: J = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: B = None
        self.o: J = None
        self.t: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: H = None
        self.v: E = None
        self.o: H = None
        self.q: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: G = None
        self.y: G = None
        self.q: G = None
        self.u: G = None
        self.p: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: B = None
        self.s: B = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: F = None
        self.v: F = None
        self.w: C = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: B = None
        self.o: B = None
        self.s: J = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: B = None
        self.o: J = None
        self.t: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: H = None
        self.v: E = None
        self.o: H = None
        self.q: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: G = None
        self.y: G = None
        self.q: G = None
        self.u: G = None
        self.p: F = None
        self.txt = txt

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

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