class A:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: C = None
        self.u: I = None
        self.y: G = None
        self.r: J = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: G = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: G = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

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

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

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