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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: E = None
        self.p: A = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: I = None
        self.t: D = None
        self.r: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: E = None
        self.p: A = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: I = None
        self.t: D = None
        self.r: C = None
        self.txt = txt

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

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