class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: F = None
        self.s: I = None
        self.w: F = None
        self.r: B = None
        self.o: B = None
        self.y: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: E = None
        self.w: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: C = None
        self.u: H = None
        self.z: A = None
        self.t: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: F = None
        self.s: I = None
        self.w: F = None
        self.r: B = None
        self.o: B = None
        self.y: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: E = None
        self.w: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: C = None
        self.u: H = None
        self.z: A = None
        self.t: A = None
        self.txt = txt

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

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