class A:
    def __init__(self, txt: str):
        self.q: J = None
        self.y: B = None
        self.r: D = None
        self.s: H = None
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: D = None
        self.s: E = None
        self.w: H = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: I = None
        self.o: C = None
        self.v: C = None
        self.q: I = None
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: J = None
        self.p: C = None
        self.r: A = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: D = None
        self.s: E = None
        self.w: H = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: I = None
        self.o: C = None
        self.v: C = None
        self.q: I = None
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: J = None
        self.p: C = None
        self.r: A = None
        self.y: H = None
        self.txt = txt

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

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

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