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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: H = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: G = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: H = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: G = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

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

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

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