class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: J = None
        self.o: H = None
        self.u: J = None
        self.s: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: C = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: G = None
        self.t: G = None
        self.w: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: F = None
        self.s: B = None
        self.y: G = None
        self.q: J = None
        self.x: C = None
        self.v: B = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: D = None
        self.u: B = None
        self.z: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: C = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: G = None
        self.t: G = None
        self.w: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: F = None
        self.s: B = None
        self.y: G = None
        self.q: J = None
        self.x: C = None
        self.v: B = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: D = None
        self.u: B = None
        self.z: A = None
        self.txt = txt

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

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

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