class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: I = None
        self.z: J = None
        self.w: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: E = None
        self.v: H = None
        self.y: A = None
        self.s: J = None
        self.q: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: A = None
        self.p: J = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: H = None
        self.q: F = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: E = None
        self.v: H = None
        self.y: A = None
        self.s: J = None
        self.q: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: A = None
        self.p: J = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: H = None
        self.q: F = None
        self.s: G = None
        self.txt = txt

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

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