class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: I = None
        self.r: H = None
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: J = None
        self.y: F = None
        self.r: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: G = None
        self.q: J = None
        self.r: A = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: B = None
        self.v: J = None
        self.z: J = None
        self.y: I = None
        self.u: G = None
        self.p: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: D = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: J = None
        self.y: F = None
        self.r: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: G = None
        self.q: J = None
        self.r: A = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: B = None
        self.v: J = None
        self.z: J = None
        self.y: I = None
        self.u: G = None
        self.p: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: D = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: G = None
        self.txt = txt

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

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

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