class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: B = None
        self.p: C = None
        self.s: B = None
        self.x: G = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: E = None
        self.q: C = None
        self.o: A = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: J = None
        self.q: I = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: D = None
        self.o: G = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: B = None
        self.p: C = None
        self.s: B = None
        self.x: G = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: E = None
        self.q: C = None
        self.o: A = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: J = None
        self.q: I = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: D = None
        self.o: G = None
        self.t: H = None
        self.txt = txt

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

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

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