class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: I = None
        self.p: B = None
        self.s: C = None
        self.o: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: F = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: J = None
        self.w: B = None
        self.y: G = None
        self.x: A = None
        self.z: B = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: H = None
        self.t: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: C = None
        self.q: B = None
        self.y: G = None
        self.s: A = None
        self.x: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: E = None
        self.v: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: F = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: J = None
        self.w: B = None
        self.y: G = None
        self.x: A = None
        self.z: B = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: H = None
        self.t: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: C = None
        self.q: B = None
        self.y: G = None
        self.s: A = None
        self.x: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: E = None
        self.v: H = None
        self.txt = txt

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

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