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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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