class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: J = None
        self.s: C = None
        self.q: B = None
        self.w: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: G = None
        self.z: H = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: B = None
        self.t: I = None
        self.x: B = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: B = None
        self.p: D = None
        self.z: I = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: H = None
        self.z: A = None
        self.u: J = None
        self.p: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: D = None
        self.z: E = None
        self.o: B = None
        self.v: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: G = None
        self.z: H = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: B = None
        self.t: I = None
        self.x: B = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: B = None
        self.p: D = None
        self.z: I = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: H = None
        self.z: A = None
        self.u: J = None
        self.p: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: D = None
        self.z: E = None
        self.o: B = None
        self.v: C = None
        self.txt = txt

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

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