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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: D = None
        self.t: F = None
        self.u: H = None
        self.w: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: I = None
        self.o: A = None
        self.t: D = None
        self.r: I = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: I = None
        self.y: B = None
        self.q: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: D = None
        self.t: F = None
        self.u: H = None
        self.w: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: I = None
        self.o: A = None
        self.t: D = None
        self.r: I = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: I = None
        self.y: B = None
        self.q: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: B = None
        self.txt = txt

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

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

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