class A:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: G = None
        self.q: J = None
        self.w: H = None
        self.x: I = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: A = None
        self.z: D = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: H = None
        self.r: G = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.x: E = None
        self.y: E = None
        self.v: J = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: F = None
        self.o: F = None
        self.p: F = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: H = None
        self.v: J = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: I = None
        self.z: A = None
        self.v: H = None
        self.x: A = None
        self.u: I = None
        self.t: E = None
        self.r: D = None
        self.w: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: A = None
        self.z: D = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: H = None
        self.r: G = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.x: E = None
        self.y: E = None
        self.v: J = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: F = None
        self.o: F = None
        self.p: F = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: H = None
        self.v: J = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: I = None
        self.z: A = None
        self.v: H = None
        self.x: A = None
        self.u: I = None
        self.t: E = None
        self.r: D = None
        self.w: G = None
        self.txt = txt

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

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