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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: E = None
        self.r: D = None
        self.s: A = None
        self.o: I = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: I = None
        self.r: H = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: E = None
        self.r: D = None
        self.s: A = None
        self.o: I = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: I = None
        self.r: H = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

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