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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: D = None
        self.o: F = None
        self.z: A = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: H = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: H = None
        self.u: F = None
        self.z: F = None
        self.x: B = None
        self.q: D = None
        self.y: C = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: G = None
        self.w: J = None
        self.t: A = None
        self.o: H = None
        self.r: G = None
        self.y: B = None
        self.p: E = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: D = None
        self.r: H = None
        self.y: C = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: J = None
        self.t: A = None
        self.s: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: I = None
        self.w: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: D = None
        self.o: F = None
        self.z: A = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: H = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: H = None
        self.u: F = None
        self.z: F = None
        self.x: B = None
        self.q: D = None
        self.y: C = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: G = None
        self.w: J = None
        self.t: A = None
        self.o: H = None
        self.r: G = None
        self.y: B = None
        self.p: E = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: D = None
        self.r: H = None
        self.y: C = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: J = None
        self.t: A = None
        self.s: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: I = None
        self.w: D = None
        self.txt = txt

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

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