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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: H = None
        self.p: D = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: I = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: J = None
        self.p: G = None
        self.z: H = None
        self.r: I = None
        self.q: J = None
        self.w: J = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.r: D = None
        self.o: E = None
        self.x: H = None
        self.z: F = None
        self.q: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: H = None
        self.w: I = None
        self.txt = txt

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

c.s = l
n.q = c
n.x = a
n.p = g
n.v = d
i.o = l
i.p = l
i.u = l
i.y = l
i.s = j
i.z = a
i.x = a
i.v = g
g.r = a
g.p = m
g.w = c
d.y = i
d.x = l
d.q = l
d.w = l
d.p = j
d.z = a
d.r = m
d.u = k
k.v = m
j.u = l
j.r = g
j.o = d
j.x = a
j.z = k
j.q = k
a.o = c
a.p = g
a.t = g
a.z = i
a.w = i
a.q = d
a.r = d
a.y = l
a.x = n
m.x = k
m.v = j
m.s = j
m.z = j
l.v = d
l.r = a
l.w = m
assert m.x.v.z.x.y.r.txt == "
class A:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: H = None
        self.p: D = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: I = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: J = None
        self.p: G = None
        self.z: H = None
        self.r: I = None
        self.q: J = None
        self.w: J = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.r: D = None
        self.o: E = None
        self.x: H = None
        self.z: F = None
        self.q: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: H = None
        self.w: I = None
        self.txt = txt

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

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