class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: I = None
        self.s: E = None
        self.y: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: J = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: F = None
        self.p: H = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.t: J = None
        self.x: D = None
        self.u: B = None
        self.o: E = None
        self.w: G = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: D = None
        self.s: G = None
        self.o: B = None
        self.y: C = None
        self.r: D = None
        self.u: D = None
        self.w: C = None
        self.v: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: J = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: F = None
        self.p: H = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.t: J = None
        self.x: D = None
        self.u: B = None
        self.o: E = None
        self.w: G = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: D = None
        self.s: G = None
        self.o: B = None
        self.y: C = None
        self.r: D = None
        self.u: D = None
        self.w: C = None
        self.v: C = None
        self.txt = txt

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

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