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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: G = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: B = None
        self.v: H = None
        self.t: J = None
        self.o: B = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: A = None
        self.s: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: G = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: B = None
        self.v: H = None
        self.t: J = None
        self.o: B = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: A = None
        self.s: E = None
        self.txt = txt

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

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