class A:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: C = None
        self.v: E = None
        self.t: F = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: A = None
        self.o: D = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: F = None
        self.o: E = None
        self.v: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: I = None
        self.u: I = None
        self.w: G = None
        self.q: B = None
        self.y: D = None
        self.z: D = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: A = None
        self.o: D = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: F = None
        self.o: E = None
        self.v: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: I = None
        self.u: I = None
        self.w: G = None
        self.q: B = None
        self.y: D = None
        self.z: D = None
        self.t: B = None
        self.txt = txt

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

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