class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: B = None
        self.p: D = None
        self.r: J = None
        self.y: H = None
        self.x: D = None
        self.u: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: G = None
        self.t: I = None
        self.y: E = None
        self.r: E = None
        self.v: B = None
        self.o: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: I = None
        self.v: J = None
        self.x: A = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: I = None
        self.y: H = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: C = None
        self.x: B = None
        self.s: B = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: G = None
        self.t: I = None
        self.y: E = None
        self.r: E = None
        self.v: B = None
        self.o: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: I = None
        self.v: J = None
        self.x: A = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: I = None
        self.y: H = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: C = None
        self.x: B = None
        self.s: B = None
        self.u: C = None
        self.txt = txt

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

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

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

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