class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: C = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: A = None
        self.w: B = None
        self.t: A = None
        self.p: I = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: I = None
        self.r: F = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: C = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: A = None
        self.w: B = None
        self.t: A = None
        self.p: I = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: I = None
        self.r: F = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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