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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: D = None
        self.o: F = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: H = None
        self.q: D = None
        self.x: B = None
        self.w: D = None
        self.y: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: A = None
        self.q: B = None
        self.w: G = None
        self.s: E = None
        self.v: D = None
        self.o: A = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: B = None
        self.p: B = None
        self.v: E = None
        self.x: G = None
        self.t: G = None
        self.q: A = None
        self.z: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: D = None
        self.o: F = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: H = None
        self.q: D = None
        self.x: B = None
        self.w: D = None
        self.y: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: A = None
        self.q: B = None
        self.w: G = None
        self.s: E = None
        self.v: D = None
        self.o: A = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: B = None
        self.p: B = None
        self.v: E = None
        self.x: G = None
        self.t: G = None
        self.q: A = None
        self.z: H = None
        self.txt = txt

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

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