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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: H = None
        self.w: B = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: G = None
        self.t: C = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: H = None
        self.w: B = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: G = None
        self.t: C = None
        self.r: C = None
        self.txt = txt

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

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

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

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