class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: I = None
        self.x: H = None
        self.q: E = None
        self.r: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: J = None
        self.s: H = None
        self.v: C = None
        self.o: H = None
        self.t: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: G = None
        self.t: B = None
        self.r: G = None
        self.q: G = None
        self.v: I = None
        self.y: G = None
        self.x: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: J = None
        self.s: H = None
        self.v: C = None
        self.o: H = None
        self.t: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: G = None
        self.t: B = None
        self.r: G = None
        self.q: G = None
        self.v: I = None
        self.y: G = None
        self.x: G = None
        self.txt = txt

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

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